format file api.py

This commit is contained in:
JVMartyns 2024-04-08 10:51:12 -03:00
parent 0471f98941
commit eb70b7012c

View file

@ -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"]