aboutsummaryrefslogtreecommitdiff
path: root/models.py
diff options
context:
space:
mode:
authorAlban Gruin2017-10-19 22:48:16 +0200
committerAlban Gruin2017-10-19 22:48:16 +0200
commit276dc9017b414404539b20f32bcc65959fd32adb (patch)
treee80a53ca7338b7cb49cae1112a72210acab54fcb /models.py
parente7df75f46aec90652c2e501cfacdd31a7be5be4a (diff)
Adaptation des vues, correction du critère de sélection des groupes
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 fe285ac..db9e262 100644
--- a/models.py
+++ b/models.py
@@ -151,7 +151,7 @@ class CourseManager(Manager):
def get_courses_for_group(self, group, **criteria):
groups_criteria = reduce(lambda x, y: x | y,
[Q(groups__subgroup=group.subgroup[:i])
- for i in range(1, len(group.subgroup))]) | \
+ for i in range(1, len(group.subgroup) + 1)]) | \
Q(groups__subgroup__isnull=True)
return self.get_queryset() \