mirror of
https://github.com/PokeAPI/pokeapi
synced 2024-11-24 20:33:04 +00:00
format file api.py
This commit is contained in:
parent
0471f98941
commit
eb70b7012c
1 changed files with 6 additions and 3 deletions
|
@ -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"]
|
||||
|
|
Loading…
Reference in a new issue