diff options
-rw-r--r-- | feeds.py | 4 |
1 files changed, 1 insertions, 3 deletions
@@ -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: |