diff options
author | Alban Gruin | 2017-11-01 16:08:38 +0100 |
---|---|---|
committer | Alban Gruin | 2017-11-01 16:08:38 +0100 |
commit | 9d364f627dc90f3a361cc9acbc2e91f64ee9edcf (patch) | |
tree | 9b3f8e7154200b8e9b9b2b72388cebeb00347377 | |
parent | 2d68777e50e261cb793186321947b677ed9de692 (diff) |
Utilisation de self.get_queryset() plutôt que Group.objects
-rw-r--r-- | models.py | 2 |
1 files changed, 1 insertions, 1 deletions
@@ -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") |