aboutsummaryrefslogtreecommitdiff
path: root/views.py
diff options
context:
space:
mode:
Diffstat (limited to 'views.py')
-rw-r--r--views.py5
1 files changed, 4 insertions, 1 deletions
diff --git a/views.py b/views.py
index de510a3..ebcf4ff 100644
--- a/views.py
+++ b/views.py
@@ -86,7 +86,10 @@ def timetable_common(request, obj, year=None, week=None, timetable=None):
elif (int(year), int(week)) < (current_year, current_week):
is_old_timetable = True
- start, end = get_week(year, week)
+ try:
+ start, end = get_week(year, week)
+ except ValueError:
+ raise Http404
courses = Course.objects.get_courses(obj, begin__gte=start, begin__lt=end)
if not courses.exists() and provided_week: