From ba343196f8305dfadf01f8a617b05e6d9723ce13 Mon Sep 17 00:00:00 2001 From: Alban Gruin Date: Wed, 27 Sep 2017 13:48:44 +0200 Subject: On compare le résultat de la fonction à 0, pas la fonction --- views.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/views.py b/views.py index eb6a7ac..66f0a03 100644 --- a/views.py +++ b/views.py @@ -64,7 +64,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).annotate(Max("last_update")) - if courses.count == 0: + if courses.count() == 0: raise Http404 grouped_courses = group_courses(courses) -- cgit v1.2.1