From 12db174d1e2c6cbd0daec10a6fc91e17a4da8246 Mon Sep 17 00:00:00 2001 From: Robert Williams Date: Sat, 3 Feb 2024 22:02:23 -0600 Subject: [PATCH] that line was needed after all --- pokemon_v2/serializers.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/pokemon_v2/serializers.py b/pokemon_v2/serializers.py index ddd80eb9..7c45acde 100644 --- a/pokemon_v2/serializers.py +++ b/pokemon_v2/serializers.py @@ -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