aboutsummaryrefslogtreecommitdiff
path: root/views.py
diff options
context:
space:
mode:
authorAlban Gruin2017-09-28 21:57:54 +0200
committerAlban Gruin2017-09-28 21:57:54 +0200
commita1231e340dbb9236f3804679360c0ab7895ae903 (patch)
tree4d7cbd83b898983526b4b860c4c46aaae1384413 /views.py
parent1c3a7336ad48742da5da56b301496a10a38b92b0 (diff)
Affichage seulement des groupes intéressants pour éviter des clics inutiles :
Si les enfants d’un groupe ont eux-mêmes des enfants, on n’affiche pas ce groupe mais ces enfants.
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 82ef639..23bced4 100644
--- a/views.py
+++ b/views.py
@@ -75,7 +75,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)
if group.children.count():
- return group_list_common(request, timetable, group.children.order_by("name"))
+ return group_list_common(request, timetable, Group.objects.get_relevant_children(group))
courses = Course.objects.get_courses_for_group(group, begin__gte=start, begin__lt=end) \
.annotate(Max("last_update"))