aboutsummaryrefslogtreecommitdiff
path: root/models.py
diff options
context:
space:
mode:
authorAlban Gruin2017-02-04 22:03:10 +0100
committerAlban Gruin2017-02-04 22:03:10 +0100
commitfd3153f3fcf39eb012fa2e6dd4bcb4c45d97aeea (patch)
tree5c5e2182960201430eb2c5f75a8eca59a96f38a2 /models.py
parentcf33d71b521f6d9a11d351e0a03ac1d8e56123d1 (diff)
Correction du groupage adaptée pour pgsqlv0.3.2
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 87c4ca4..ff4897b 100644
--- a/models.py
+++ b/models.py
@@ -122,7 +122,7 @@ class Room(models.Model):
class CourseManager(GroupedManager):
def __get_weeks(self, qs):
extractYear = ExtractYear("begin")
- qs = qs.group_by("groups", "year", "week").order_by("groups__name", "year", "week")
+ qs = qs.group_by("groups", "year", "week", "groups__timetable", "groups__mention", "groups__subgroup", "groups__td", "groups__tp", "begin", "groups__name").order_by("groups__name", "year", "week")
if connection.vendor == "postgresql":
return qs.annotate(week=ExtractWeek("begin"), year=extractYear)