diff options
Diffstat (limited to 'views.py')
-rw-r--r-- | views.py | 5 |
1 files changed, 4 insertions, 1 deletions
@@ -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: |