Forget cancelled songs instead of state=(*)

This commit is contained in:
Daan Sprenkels
2018-11-23 16:32:18 +01:00
parent 84bf2653c2
commit c1889954d7

View File

@ -214,8 +214,7 @@ def cancel(request):
playlist_song = get_object_or_404(PlaylistSong, id=request.POST.get('id'))
if playlist_song.user != request.user and not request.user.has_perm('queues.can_cancel'):
return HttpResponseForbidden()
playlist_song.state = 3
playlist_song.save()
playlist_song.delete()
return JsonResponse({})