

def get_pokedex_entries(self, obj):
    results = PokemonDexNumber.objects.order_by('pokedex_number').filter(pokedex=obj)
    serializer = PokemonDexNumberSerializer(results, many=True, context=self.context)
    data = serializer.data
    for entry in data:
        del entry['pokedex']
    return data

dataset/ETHPy150Open phalt/pokeapi/pokemon_v2/serializers.py PokedexDetailSerializer.get_pokedex_entries/original