From 3d626e8420676aac988d759852cd7ba7d7739138 Mon Sep 17 00:00:00 2001 From: James Polley Date: Thu, 12 Jan 2017 16:49:07 +1100 Subject: [PATCH] Handle slots with no Proposal * Use the item kind for a title if there's no proposal * Use the content_override for the description if there's no proposal --- symposion/schedule/views.py | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/symposion/schedule/views.py b/symposion/schedule/views.py index 017ab11f..3fca85e6 100644 --- a/symposion/schedule/views.py +++ b/symposion/schedule/views.py @@ -276,17 +276,18 @@ class EventFeed(ICalFeed): def item_title(self, item): if hasattr(item.content, 'proposal'): - return item.content.title + title = item.content.title else: - item.content_override if item.content_override else "Slot" + title = item.kind if item.kind else "Slot" + return title def item_description(self, item): if hasattr(item.content, 'proposal'): description = "Speaker: %s\n%s" % ( item.content.speaker, item.content.abstract) - return description else: - return None + description = item.content_override if item.content_override else "No description" + return description def item_start_datetime(self, item): return pytz.timezone(settings.TIME_ZONE).localize(item.start_datetime)