From fd3153f3fcf39eb012fa2e6dd4bcb4c45d97aeea Mon Sep 17 00:00:00 2001 From: Alban Gruin Date: Sat, 4 Feb 2017 22:03:10 +0100 Subject: Correction du groupage adaptée pour pgsql --- models.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) 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) -- cgit v1.2.1