diff options
Diffstat (limited to 'views.py')
-rw-r--r-- | views.py | 6 |
1 files changed, 3 insertions, 3 deletions
@@ -37,7 +37,7 @@ def mention_list(request, year_slug): def group_list(request, year_slug, timetable_slug): timetable = get_object_or_404(Timetable, year__slug=year_slug, slug=timetable_slug) - groups = Group.objects.filter(timetable=timetable.source, hidden=False).order_by("name") + groups = Group.objects.filter(source=timetable.source, hidden=False).order_by("name") start, _ = get_week(*get_current_week()) end = start + datetime.timedelta(weeks=4) @@ -89,14 +89,14 @@ def timetable_common(request, obj, year=None, week=None, timetable=None): def timetable(request, year_slug, timetable_slug, group_slug, year=None, week=None): timetable = get_object_or_404(Timetable, year__slug=year_slug, slug=timetable_slug) - group = get_object_or_404(Group, slug=group_slug, timetable=timetable.source) + group = get_object_or_404(Group, slug=group_slug, source=timetable.source) return timetable_common(request, group, year, week, timetable) def calendars(request, year_slug, timetable_slug, group_slug): timetable = get_object_or_404(Timetable, year__slug=year_slug, slug=timetable_slug) - group = get_object_or_404(Group, timetable=timetable.source, slug=group_slug) + group = get_object_or_404(Group, source=timetable.source, slug=group_slug) groups = Group.objects.get_parents(group).annotate(length=Length("subgroup")) \ .order_by("length") |