From 12b1393b028508fb0474c55eef10573eb88119d0 Mon Sep 17 00:00:00 2001
From: David Trattnig <david.trattnig@o94.at>
Date: Mon, 13 Dec 2021 17:14:40 +0100
Subject: [PATCH] Add another `None` check.

---
 src/models.py | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/src/models.py b/src/models.py
index dac2568..42b7a2c 100644
--- a/src/models.py
+++ b/src/models.py
@@ -122,7 +122,7 @@ class PlayLog(db.Model):
 
         if track:
             # Station fallback may not provide a duration. Take this one, it's better than nothing.
-            if track.track_duration == 0:
+            if track.track_duration == 0 or not track.track_duration:
                 return track
 
             # Preferably only get playlogs which are known for still being on air
-- 
GitLab