(self, obj)
| 5198 | } |
| 5199 | ) |
| 5200 | def get_species(self, obj): |
| 5201 | evo_objects = PokemonEvolution.objects.filter(evolution_trigger=obj) |
| 5202 | species_list = [] |
| 5203 | species_names = set() |
| 5204 | |
| 5205 | for evo in evo_objects: |
| 5206 | species = PokemonSpeciesSummarySerializer( |
| 5207 | evo.evolved_species, context=self.context |
| 5208 | ).data |
| 5209 | if species["name"] not in species_names: |
| 5210 | species_list.append(species) |
| 5211 | species_names.add(species["name"]) |
| 5212 | |
| 5213 | return species_list |
| 5214 | |
| 5215 | |
| 5216 | class PokemonSpeciesDescriptionSerializer(serializers.ModelSerializer): |
nothing calls this directly
no test coverage detected