исправил ошибку в отображении
This commit is contained in:
parent
4df39b180f
commit
e5683e1761
|
|
@ -19,7 +19,7 @@ class SongViewSet(ViewSet):
|
||||||
@action(detail=False, methods=['post'], schema=SongSchema())
|
@action(detail=False, methods=['post'], schema=SongSchema())
|
||||||
def create_song(self, request):
|
def create_song(self, request):
|
||||||
song = get_object_or_404(Song, azura_id = request.data['azura_id'])
|
song = get_object_or_404(Song, azura_id = request.data['azura_id'])
|
||||||
if song.exists():
|
if song:
|
||||||
data = {
|
data = {
|
||||||
"song": song.id,
|
"song": song.id,
|
||||||
"user": request.user.pk
|
"user": request.user.pk
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue