

def get_type_pokemon(self, obj):
    poke_type_objects = PokemonType.objects.filter(type=obj)
    poke_types = PokemonTypeSerializer(poke_type_objects, many=True, context=self.context).data
    for poke_type in poke_types:
        del poke_type['type']
    return poke_types

dataset/ETHPy150Open phalt/pokeapi/pokemon_v2/serializers.py TypeDetailSerializer.get_type_pokemon/original