diff --git a/pokemon_v2/api.py b/pokemon_v2/api.py index e5405211..0e82eb53 100644 --- a/pokemon_v2/api.py +++ b/pokemon_v2/api.py @@ -397,7 +397,8 @@ class PokemonEncounterView(APIView): for area_id in area_ids: location_area = location_area_objects.get(pk=area_id) - area_encounters = encounter_objects.filter(location_area_id=area_id) + area_encounters = encounter_objects.filter( + location_area_id=area_id) version_ids = ( area_encounters.order_by("version_id") @@ -422,8 +423,10 @@ class PokemonEncounterView(APIView): encounter_details_list = [] for encounter in encounters_data: - slot = EncounterSlot.objects.get(pk=encounter["encounter_slot"]) - slot_data = EncounterSlotSerializer(slot, context=self.context).data + slot = EncounterSlot.objects.get( + pk=encounter["encounter_slot"]) + slot_data = EncounterSlotSerializer( + slot, context=self.context).data del encounter["pokemon"] del encounter["encounter_slot"]