diff options
author | Alban Gruin | 2017-02-05 13:59:51 +0100 |
---|---|---|
committer | Alban Gruin | 2017-02-05 13:59:51 +0100 |
commit | 10bca4899aeb607b86480f35fc8c9db6bb7c6714 (patch) | |
tree | d3eb2184eef141b3a9ca023522e24d34841640f6 /models.py | |
parent | 5363b70a7840f937f710e0a85fa83e48a35e083a (diff) |
Filtrage par emploi du temps global lors de la récupération des cours pour un groupestable/0.3.z
Diffstat (limited to 'models.py')
-rw-r--r-- | models.py | 2 |
1 files changed, 1 insertions, 1 deletions
@@ -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) |