Commit 3d301163 authored by david's avatar david
Browse files

Init current playlogs. engine-clock#11

parent 23958212
Pipeline #892 passed with stages
in 3 minutes and 30 seconds
......@@ -483,6 +483,8 @@ class ClockInfo(db.Model):
playlogs = PlayLog.select_for_timeslot(most_recent_track.timeslot_id)
playlogs.sort(key=lambda track: track.track_start, reverse=False)
info["current_playlogs"] = playlog_schema.dump(playlogs)
if info["current_playlogs"] == None:
info["current_playlogs"] = {}
# Invalid timeslots (e.g. in fallback scenarios) get a virtual start date of the first fallback track
if info["current_timeslot"]["timeslot_id"] == -1:
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment