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

Method get_species

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

Source from the content-addressed store, hash-verified

2297 }
2298 )
2299 def get_species(self, obj):
2300 results = PokemonEggGroup.objects.filter(egg_group=obj)
2301 data = PokemonEggGroupSerializer(results, many=True, context=self.context).data
2302 associated_species = []
2303 for species in data:
2304 associated_species.append(species["species"])
2305
2306 return associated_species
2307
2308
2309######################

Callers

nothing calls this directly

Calls 1

Tested by

no test coverage detected