diff options
author | Alban Gruin | 2017-02-12 13:30:55 +0100 |
---|---|---|
committer | Alban Gruin | 2017-02-12 13:30:55 +0100 |
commit | 8d382e5fa2107398d8793483674d50d768cd3029 (patch) | |
tree | e4d86a0faa880eca03a1824d7717b983a55ee17c | |
parent | 9be6d21a548a1a041fdf52791fde96cc49092682 (diff) |
Erreur 404 au lieu de 500 si une semaine n'est pas trouvée
-rw-r--r-- | views.py | 2 |
1 files changed, 1 insertions, 1 deletions
@@ -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) |