]> git.0d.be Git - panikweb.git/commitdiff
onair: do not crash on diffusions
authorFrédéric Péters <fpeters@0d.be>
Tue, 16 May 2023 11:37:00 +0000 (13:37 +0200)
committerFrédéric Péters <fpeters@0d.be>
Tue, 16 May 2023 11:37:00 +0000 (13:37 +0200)
panikweb/views.py

index b1e5be594e8fd775f8b75018af2d1ac6a130e66b..3f9fef0b297aac37526f4d53d14d9a6fdec50ad9 100644 (file)
@@ -903,7 +903,10 @@ class OnAir(View):
                 'url': ctx['emission'].get_absolute_url(),
                 'chat': chat_url,
             }
-            if ctx['current_slot'].recurringplaylistdiffusion_set.exists():
+            if (
+                hasattr(ctx['current_slot'], 'recurringplaylistdiffusion_set')
+                and ctx['current_slot'].recurringplaylistdiffusion_set.exists()
+            ):
                 include_track_metadata = True
 
         if ctx.get('nonstop'):