From 9c1dca9808181f49e988e7dd5f0ccdb5133cdce0 Mon Sep 17 00:00:00 2001 From: Ernesto Rico Schmidt <ernesto@helsinki.at> Date: Thu, 28 Jul 2022 10:41:41 -0400 Subject: [PATCH] Remove is_repetition field from, add repetition_of field to views. --- program/views.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/program/views.py b/program/views.py index acd66207..0ffcb03f 100644 --- a/program/views.py +++ b/program/views.py @@ -146,7 +146,7 @@ def json_playout(request): schedule = [] for ts in timeslots: - is_repetition = " " + _("REP") if ts.schedule.is_repetition is True else "" + is_repetition = " " + _("REP") if ts.schedule.repetition_of else "" hosts = ", ".join(ts.show.hosts.values_list("name", flat=True)) categories = ", ".join(ts.show.category.values_list("name", flat=True)) @@ -607,7 +607,7 @@ class APITimeSlotViewSet( # We do this because the Dashboard needs to update the repetition timeslot as well # but with another playlist containing the recording instead of the original playlist ts = TimeSlot.objects.filter(show=show_pk, start__gt=timeslot.start)[0] - if ts.is_repetition: + if ts.repetition_of: serializer = TimeSlotSerializer(ts) return Response(serializer.data) -- GitLab