diff options
author | Alban Gruin | 2017-09-27 13:48:44 +0200 |
---|---|---|
committer | Alban Gruin | 2017-09-27 13:48:44 +0200 |
commit | ba343196f8305dfadf01f8a617b05e6d9723ce13 (patch) | |
tree | d54e4bcbe4d934d3ba8efc0ddcad9ba5e272b1f4 | |
parent | aa7ccf13a8735f162e2ea859ad1d8ebe9f34f657 (diff) |
On compare le résultat de la fonction à 0, pas la fonction
-rw-r--r-- | views.py | 2 |
1 files changed, 1 insertions, 1 deletions
@@ -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) |