MCPcopy Index your code
hub / github.com/PokeAPI/pokeapi / get_pokemon_abilities

Method get_pokemon_abilities

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

Source from the content-addressed store, hash-verified

4883 }
4884 )
4885 def get_pokemon_abilities(self, obj):
4886 pokemon_ability_objects = PokemonAbility.objects.filter(pokemon=obj)
4887 data = PokemonAbilitySerializer(
4888 pokemon_ability_objects, many=True, context=self.context
4889 ).data
4890 abilities = []
4891
4892 for ability in data:
4893 del ability["pokemon"]
4894 abilities.append(ability)
4895
4896 return abilities
4897
4898 # {
4899 # "abilities": [

Callers

nothing calls this directly

Calls 1

Tested by

no test coverage detected