From cc64acb64af30771c523a1e0794f0976df14769b Mon Sep 17 00:00:00 2001 From: Alban Gruin Date: Thu, 16 Nov 2017 14:14:06 +0100 Subject: Correction d’une erreur de parenthésage dans get_parents() Le + 1 doit venir _après_ len(), pas pendant… --- models.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/models.py b/models.py index a90e9da..4b86961 100644 --- a/models.py +++ b/models.py @@ -77,7 +77,7 @@ class GroupManager(Manager): if len(group.subgroup) != 0: groups_criteria |= reduce(lambda x, y: x | y, [Q(subgroup=group.subgroup[:i]) - for i in range(1, len(group.subgroup + 1))]) + for i in range(1, len(group.subgroup) + 1)]) return self.get_queryset().filter(groups_criteria, mention=group.mention, timetable=group.timetable) -- cgit v1.2.1