diff options
author | Alban Gruin | 2017-03-26 18:19:43 +0200 |
---|---|---|
committer | Alban Gruin | 2017-03-26 18:19:43 +0200 |
commit | 3b33b8bde368980039c0b5c9e7aa6df05063afb2 (patch) | |
tree | 171f794e9ba48646f1add1e0129df8e6d9bde0bb /models.py | |
parent | 10e90edecc88cb45ac7c88c9ec77de00d656d470 (diff) | |
parent | b3a9ed0743f0db3ba65973769ea981bb50c64482 (diff) |
Merge branch 'stable/0.7.z' into prod/pa1ch/0.7.zv0.7.2-pa1ch
Diffstat (limited to 'models.py')
-rw-r--r-- | models.py | 2 |
1 files changed, 1 insertions, 1 deletions
@@ -133,7 +133,7 @@ class Room(models.Model): class CourseManager(Manager): 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, timetable=group.timetable, **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), Q(groups__subgroup__isnull=True) | Q(groups__subgroup=group.subgroup), groups__mention=group.mention, timetable=group.timetable, **filters).order_by("begin") def get_weeks(self, **criteria): qs = self.get_queryset().filter(**criteria).order_by("groups__name", "year", "week").annotate(_=Count(("groups", "year", "week", "begin")), year=ExtractYear("begin")) |