aboutsummaryrefslogtreecommitdiff
path: root/feeds.py
diff options
context:
space:
mode:
Diffstat (limited to 'feeds.py')
-rw-r--r--feeds.py7
1 files changed, 6 insertions, 1 deletions
diff --git a/feeds.py b/feeds.py
index 66be12e..aced5e6 100644
--- a/feeds.py
+++ b/feeds.py
@@ -75,6 +75,11 @@ class IcalFeed(Feed):
def item_link(self, item):
return ""
+ def item_summary(self, item):
+ if item.type is not None:
+ return item.name + " (" + item.type + ")"
+ return item.name
+
def items(self, obj):
return Course.objects.get_courses_for_group(obj)
@@ -83,7 +88,7 @@ class IcalFeed(Feed):
"dtstart": item.begin,
"dtend": item.end,
"dtstamp": item.last_update,
- "summary": item.name + " (" + item.type + ")",
+ "summary": self.item_summary(item),
"location": format_rooms(item.rooms.all())}