From 9d364f627dc90f3a361cc9acbc2e91f64ee9edcf Mon Sep 17 00:00:00 2001 From: Alban Gruin Date: Wed, 1 Nov 2017 16:08:38 +0100 Subject: Utilisation de self.get_queryset() plutôt que Group.objects --- models.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/models.py b/models.py index c3118a3..cb975ab 100644 --- a/models.py +++ b/models.py @@ -80,7 +80,7 @@ class GroupManager(Manager): timetable=group.timetable) def get_relevant_groups(self, timetable, *args, **criteria): - sub = Group.objects.filter(timetable=timetable, mention=OuterRef("mention"), + sub = self.get_queryset().filter(timetable=timetable, mention=OuterRef("mention"), subgroup__startswith=OuterRef("subgroup")) \ .order_by().values("mention").annotate(c=Count("*")).values("c") -- cgit v1.2.1