From 155f841afa5dd8db7ef8e0a6d55669c037427efd Mon Sep 17 00:00:00 2001 From: Joel Addison Date: Sun, 29 Jan 2017 22:08:49 +1000 Subject: [PATCH] Generate ical description dynamically Use method instead of class attribute for ical feed description. This allows the class to be instantiated without a database being available (eg. during migrate). --- symposion/schedule/views.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/symposion/schedule/views.py b/symposion/schedule/views.py index aba9a9a4..e7c2eedd 100644 --- a/symposion/schedule/views.py +++ b/symposion/schedule/views.py @@ -270,7 +270,8 @@ class EventFeed(ICalFeed): product_id = '-//linux.conf.au/schedule//EN' timezone = settings.TIME_ZONE filename = 'conference.ics' - description = Conference.objects.all().first().title + def description(self): + return Conference.objects.all().first().title def items(self): return Slot.objects.filter(