From 2f312b35098326f3c48ae91e4599dedadb86eb4d Mon Sep 17 00:00:00 2001 From: Tobias Kunze Date: Sun, 21 Nov 2021 10:06:45 +0100 Subject: [PATCH] Don't display "None" when no infoline is configured --- pretalx_lower_thirds/views.py | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/pretalx_lower_thirds/views.py b/pretalx_lower_thirds/views.py index 123bfc2..8d679f9 100644 --- a/pretalx_lower_thirds/views.py +++ b/pretalx_lower_thirds/views.py @@ -50,6 +50,7 @@ class ScheduleView(EventPermissionRequired, ScheduleMixin, TemplateView): schedule=self.schedule, ) tz = pytz.timezone(schedule.event.timezone) + infoline = str(schedule.event.settings.infoline or "") return JsonResponse( { "conference": { @@ -88,9 +89,7 @@ class ScheduleView(EventPermissionRequired, ScheduleMixin, TemplateView): if talk.submission.track else None, "room": str(room["name"]), - "infoline": str( - schedule.event.settings.lower_thirds_info_string - ).format( + "infoline": infoline.format( EVENT_SLUG=str(schedule.event.slug), TALK_SLUG=talk.frab_slug, CODE=talk.submission.code,