

def get_ability_pokemon(self, obj):
    pokemon_ability_objects = PokemonAbility.objects.filter(ability=obj)
    data = PokemonAbilitySerializer(pokemon_ability_objects, many=True, context=self.context).data
    pokemon = []
    for poke in data:
        del poke['ability']
        pokemon.append(poke)
    return pokemon

dataset/ETHPy150Open phalt/pokeapi/pokemon_v2/serializers.py AbilityDetailSerializer.get_ability_pokemon/original