Staff requests shouldn't affect when to play next.

This commit is contained in:
Josh W 2020-02-14 15:34:04 -05:00
parent 7b3ed3d127
commit 5f3d507612

View file

@ -29,7 +29,7 @@ def update_song_plays(sender, instance, created, update_fields, **kwargs):
song.num_played = F('num_played') + 1 song.num_played = F('num_played') + 1
song.save() song.save()
if 'queued_at' in update_fields: if 'queued_at' in update_fields:
if song.is_song: if song.is_song and not instance.profile.user.is_staff:
queued = instance.queued_at queued = instance.queued_at
song.next_play = song.get_date_when_requestable(queued) song.next_play = song.get_date_when_requestable(queued)
song.save() song.save()