1
0
Fork 0
mirror of https://github.com/Kunsi/pretalx-plugin-broadcast-tools synced 2024-11-24 12:51:01 +00:00

Merge pull request #5 from rixx/fallback-info

Don't display "None" when no infoline is configured
This commit is contained in:
Franzi 2021-11-21 10:12:18 +01:00 committed by GitHub
commit 7107150736
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -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,