Template refactor, task update

Banter no longer fails if AI offline. Refactoring of templates.
This commit is contained in:
2024-02-18 23:33:09 +01:00
parent c7bd7fda9b
commit fcf31cb896
14 changed files with 90 additions and 46 deletions
+1 -1
View File
@@ -11,7 +11,7 @@ def from_json(cls, json):
def get_unvoted(user):
votes = set(Vote.objects.filter(user=user).values_list('track_id', flat=True))
tracks = set(Track.objects.values_list('pk', flat=True))
tracks = set(Track.objects.filter(banter_done=True).values_list('pk', flat=True))
seed(user.username)
try:
random_track = choice(list(tracks - votes))