aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--feeds.py4
1 files changed, 1 insertions, 3 deletions
diff --git a/feeds.py b/feeds.py
index e2b0b3f..8191cbb 100644
--- a/feeds.py
+++ b/feeds.py
@@ -50,9 +50,7 @@ class IcalFeed(Feed):
def get_object(self, request, year_slug, timetable_slug, group_slug):
try:
- year = Year.objects.get(slug=year_slug)
- timetable = Timetable.objects.get(year=year, slug=timetable_slug)
- group = Group.objects.get(timetable=timetable, slug=group_slug)
+ group = Group.objects.get(timetable__year__slug=year_slug, timetable__slug=timetable_slug, slug=group_slug)
except:
raise ObjectDoesNotExist
else: