mirror of
https://gitlab.science.ru.nl/technicie/MarietjeDjango.git
synced 2025-12-10 09:12:23 +01:00
Merge branch 'dsprenkels/unlimited_queue_length' into 'marietje-zuid'
queues: Fix unlimited_queue codename in check See merge request dsprenkels/MarietjeDjango!57
This commit is contained in:
@ -112,7 +112,7 @@ class Queue(models.Model):
|
|||||||
return songs[1:]
|
return songs[1:]
|
||||||
|
|
||||||
def request(self, song, user):
|
def request(self, song, user):
|
||||||
if not user.has_perm('unlimited_queue_length'):
|
if not user.has_perm('queues.unlimited_queue_length'):
|
||||||
playlist_songs = PlaylistSong.objects.filter(playlist=self.playlist, state=0).order_by('id')
|
playlist_songs = PlaylistSong.objects.filter(playlist=self.playlist, state=0).order_by('id')
|
||||||
|
|
||||||
seconds_in_a_row = sum(ps.song.duration for ps in playlist_songs if ps.user == user)
|
seconds_in_a_row = sum(ps.song.duration for ps in playlist_songs if ps.user == user)
|
||||||
|
|||||||
Reference in New Issue
Block a user