aboutsummaryrefslogtreecommitdiff
path: root/views.py
diff options
context:
space:
mode:
authorAlban Gruin2017-02-12 13:30:55 +0100
committerAlban Gruin2017-02-12 13:30:55 +0100
commit8d382e5fa2107398d8793483674d50d768cd3029 (patch)
treee4d86a0faa880eca03a1824d7717b983a55ee17c /views.py
parent9be6d21a548a1a041fdf52791fde96cc49092682 (diff)
Erreur 404 au lieu de 500 si une semaine n'est pas trouvée
Diffstat (limited to 'views.py')
-rw-r--r--views.py2
1 files changed, 1 insertions, 1 deletions
diff --git a/views.py b/views.py
index c573589..651533a 100644
--- a/views.py
+++ b/views.py
@@ -59,8 +59,8 @@ def timetable(request, timetable_slug, group_slug, year=None, week=None):
timetable = get_object_or_404(Timetable, slug=timetable_slug)
group = get_object_or_404(Group, slug=group_slug, timetable=timetable)
+ last_update = get_object_or_404(LastUpdate, timetable=timetable, week=week, year=year)
courses = Course.objects.get_courses_for_group(group, begin__gte=start, begin__lt=end)
- last_update = LastUpdate.objects.get(timetable=timetable, week=week, year=year)
grouped_courses = group_courses(courses)