aboutsummaryrefslogtreecommitdiff
path: root/views.py
diff options
context:
space:
mode:
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 4431891..c647fac 100644
--- a/views.py
+++ b/views.py
@@ -77,7 +77,7 @@ def timetable(request, year_slug, timetable_slug, group_slug, year=None, week=No
group = get_object_or_404(Group, slug=group_slug, timetable=timetable)
courses = Course.objects.get_courses_for_group(group, begin__gte=start, begin__lt=end)
- if courses.count() == 0 and provided_week:
+ if not courses.exists() and provided_week:
raise Http404
last_update = courses.aggregate(Max("last_update"))["last_update__max"]