

def get_berries_with_flavor(self, obj):
    flavor_map_objects = BerryFlavorMap.objects.filter(berry_flavor=obj, potency__gt=0).order_by('potency')
    flavor_maps = BerryFlavorMapSerializer(flavor_map_objects, many=True, context=self.context).data
    for map in flavor_maps:
        del map['flavor']
    return flavor_maps

dataset/ETHPy150Open phalt/pokeapi/pokemon_v2/serializers.py BerryFlavorDetailSerializer.get_berries_with_flavor/original