MCPcopy Create free account
hub / github.com/PokeAPI/pokeapi / get_ability_pokemon

Method get_ability_pokemon

pokemon_v2/serializers.py:1389–1400  ·  view source on GitHub ↗
(self, obj)

Source from the content-addressed store, hash-verified

1387 }
1388 )
1389 def get_ability_pokemon(self, obj):
1390 pokemon_ability_objects = PokemonAbility.objects.filter(ability=obj)
1391 data = PokemonAbilitySerializer(
1392 pokemon_ability_objects, many=True, context=self.context
1393 ).data
1394 pokemon = []
1395
1396 for poke in data:
1397 del poke["ability"]
1398 pokemon.append(poke)
1399
1400 return pokemon
1401
1402
1403######################

Callers

nothing calls this directly

Calls 1

Tested by

no test coverage detected