aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAlban Gruin2017-09-08 20:53:53 +0200
committerAlban Gruin2017-09-08 20:53:53 +0200
commit62e7f87c1f867e3ac4f2750e9d422c67788e65a9 (patch)
tree158e17f141aad4aaf48e2f18c5513c1865c8fdc0
parent82349adf8da273ce37cd7293d30798e17e8fdc71 (diff)
Regroupement des requĂȘtes
-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: