Rename variable for less confusion.
This commit is contained in:
parent
1af8de36be
commit
98fa88bd20
1 changed files with 8 additions and 8 deletions
|
@ -68,19 +68,19 @@ class NextRequest(RetrieveAPIView):
|
|||
if [j for j in queued_songs if j.song.is_jingle]:
|
||||
if not SongRequest.music.new_requests().exists():
|
||||
random_song = Song.music.get_random_requestable_song()
|
||||
next_play = SongRequest.objects.create(profile=dj_profile,
|
||||
song=random_song)
|
||||
next_request = SongRequest.objects.create(profile=dj_profile,
|
||||
song=random_song)
|
||||
else:
|
||||
next_play = SongRequest.music.next_request()
|
||||
next_request = SongRequest.music.next_request()
|
||||
else:
|
||||
random_jingle = Song.music.get_random_jingle()
|
||||
next_play = SongRequest.objects.create(profile=dj_profile,
|
||||
song=random_jingle)
|
||||
next_request = SongRequest.objects.create(profile=dj_profile,
|
||||
song=random_jingle)
|
||||
|
||||
next_play.queued_at = timezone.now()
|
||||
next_play.save(update_fields=['queued_at'])
|
||||
next_request.queued_at = timezone.now()
|
||||
next_request.save(update_fields=['queued_at'])
|
||||
|
||||
serializer = GetRequestSerializer(next_play, many=False)
|
||||
serializer = GetRequestSerializer(next_request, many=False)
|
||||
|
||||
media_type = request.accepted_renderer.media_type
|
||||
if media_type == 'application/vnd.liquidsoap.annotate':
|
||||
|
|
Loading…
Reference in a new issue