diff options
author | Alban Gruin | 2017-03-26 18:17:33 +0200 |
---|---|---|
committer | Alban Gruin | 2017-03-26 18:17:33 +0200 |
commit | b3a9ed0743f0db3ba65973769ea981bb50c64482 (patch) | |
tree | 3ad275aab46b03e8c14a34b00da1d98007f7f167 /models.py | |
parent | df8f43e5af448a7d635e762e15ff906ab76565f1 (diff) |
Le sous-groupe peut ĂȘtre nulv0.7.2
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")) |