diff options
author | Alban Gruin | 2017-09-08 20:53:53 +0200 |
---|---|---|
committer | Alban Gruin | 2017-09-08 20:53:53 +0200 |
commit | 62e7f87c1f867e3ac4f2750e9d422c67788e65a9 (patch) | |
tree | 158e17f141aad4aaf48e2f18c5513c1865c8fdc0 | |
parent | 82349adf8da273ce37cd7293d30798e17e8fdc71 (diff) |
Regroupement des requĂȘtes
-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: |