that line was needed after all

This commit is contained in:
Robert Williams 2024-02-03 22:02:23 -06:00
parent 8f9fd71aa6
commit 12db174d1e

View file

@ -2343,10 +2343,10 @@ class MoveDetailSerializer(serializers.ModelSerializer):
data = MoveEffectEffectTextSerializer(
effect_texts, many=True, context=self.context
).data
effect_entries = data[0]
for i, k in enumerate(effect_entries):
data[0][k] = effect_entries[k].replace('$effect_chance', f'{obj.move_effect_chance}')
if '$effect_chance%' in effect_entries[k]:
data[0][k] = effect_entries[k].replace('$effect_chance', f'{obj.move_effect_chance}')
return data