aboutsummaryrefslogtreecommitdiff
path: root/views.py
diff options
context:
space:
mode:
Diffstat (limited to 'views.py')
-rw-r--r--views.py6
1 files changed, 3 insertions, 3 deletions
diff --git a/views.py b/views.py
index 32a45fe..31a89f5 100644
--- a/views.py
+++ b/views.py
@@ -36,15 +36,15 @@ def mention_list(request, year_slug):
def group_list(request, year_slug, timetable_slug):
get_object_or_404(Year, slug=year_slug)
timetable = get_object_or_404(Timetable, slug=timetable_slug)
- groups = Group.objects.get_relevant_groups().order_by("name")
+ groups = Group.objects.get_relevant_groups(timetable=timetable).order_by("name")
year, week = get_current_week()
start, _ = get_week(year, week)
- groups_weeks = Course.objects.get_weeks(begin__gte=start).values("group__timetable", "groups__mention", "groups__subgroup", "groups__td", "groups__tp", "year", "week")
+ groups_weeks = Course.objects.get_weeks(begin__gte=start, timetable=timetable).values("groups__mention", "groups__subgroup", "groups__td", "groups__tp", "year", "week")
for group in groups:
for group_week in groups_weeks:
- if group.corresponds_to(group_week["groups__timetable"], group_week["groups__mention"], group_week["groups__subgroup"], group_week["groups__td"], group_week["groups__tp"]):
+ if group.corresponds_to(timetable.id, group_week["groups__mention"], group_week["groups__subgroup"], group_week["groups__td"], group_week["groups__tp"]):
if not hasattr(group, "weeks"):
group.weeks = []