(self, obj)
| 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": [ |
nothing calls this directly
no test coverage detected