diff options
author | Alban Gruin | 2017-11-25 13:17:35 +0100 |
---|---|---|
committer | Alban Gruin | 2017-11-25 13:17:35 +0100 |
commit | 68248f075dc750d7de5c0d060721ecce8f988217 (patch) | |
tree | 32b30e249031af1f40aa4868d4fdba5679c549ae | |
parent | adad24ace9ab47f12d43dca494b358544beefa00 (diff) |
Suppression de l’association automatique des groupes
-rw-r--r-- | views.py | 8 |
1 files changed, 1 insertions, 7 deletions
@@ -61,7 +61,7 @@ def group_list_common(request, timetable, groups): def group_list(request, year_slug, timetable_slug): timetable = get_object_or_404(Timetable, year__slug=year_slug, slug=timetable_slug) - groups = Group.objects.get_relevant_groups(timetable) + groups = Group.objects.filter(timetable=timetable).order_by("name") return group_list_common(request, timetable, groups) def timetable(request, year_slug, timetable_slug, group_slug, year=None, week=None): @@ -79,12 +79,6 @@ def timetable(request, year_slug, timetable_slug, group_slug, year=None, week=No timetable = get_object_or_404(Timetable, year__slug=year_slug, slug=timetable_slug) group = get_object_or_404(Group, slug=group_slug, timetable=timetable) - if Group.objects.filter(timetable=timetable, mention=group.mention, - subgroup__startswith=group.subgroup).count() > 1: - subgroups = Group.objects.get_relevant_groups(timetable, mention=group.mention, - subgroup__startswith=group.subgroup) - return group_list_common(request, timetable, subgroups) - courses = Course.objects.get_courses_for_group(group, begin__gte=start, begin__lt=end) if courses.count() == 0 and provided_week: raise Http404 |