рефакторинг
This commit is contained in:
parent
72fb5f22ea
commit
00b2d72ddb
|
|
@ -13,7 +13,7 @@ class FavoriteSongSerializer(serializers.ModelSerializer):
|
||||||
|
|
||||||
def to_representation(self, instance):
|
def to_representation(self, instance):
|
||||||
rep = super().to_representation(instance)
|
rep = super().to_representation(instance)
|
||||||
rep["song"] = SongSerializer(
|
rep["songs"] = SongSerializer(
|
||||||
instance.song, many=True).data
|
instance.song, many=True).data
|
||||||
return rep
|
return rep
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue