aboutsummaryrefslogtreecommitdiff
path: root/models.py
diff options
context:
space:
mode:
Diffstat (limited to 'models.py')
-rw-r--r--models.py2
1 files changed, 1 insertions, 1 deletions
diff --git a/models.py b/models.py
index 2f130a3..af136af 100644
--- a/models.py
+++ b/models.py
@@ -130,7 +130,7 @@ class CourseManager(GroupedManager):
return qs.annotate(week=RawSQL("""cast(strftime("%%W", "begin") as integer)""", []), year=extractYear)
def get_courses_for_group(self, group, **filters):
- return self.get_queryset().filter(Q(groups__td__isnull=True) | Q(groups__td=group.td), Q(groups__tp__isnull=True) | Q(groups__tp=group.tp), groups__mention=group.mention, groups__subgroup=group.subgroup, **filters).order_by("begin")
+ return self.get_queryset().filter(Q(groups__td__isnull=True) | Q(groups__td=group.td), Q(groups__tp__isnull=True) | Q(groups__tp=group.tp), groups__mention=group.mention, groups__subgroup=group.subgroup, timetable=group.timetable, **filters).order_by("begin")
def get_weeks(self, **criteria):
qs = self.get_queryset().filter(**criteria)