From 62e7f87c1f867e3ac4f2750e9d422c67788e65a9 Mon Sep 17 00:00:00 2001 From: Alban Gruin Date: Fri, 8 Sep 2017 20:53:53 +0200 Subject: Regroupement des requĂȘtes --- feeds.py | 4 +--- 1 file changed, 1 insertion(+), 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: -- cgit v1.2.1