aboutsummaryrefslogtreecommitdiff
path: root/models.py
diff options
context:
space:
mode:
authorAlban Gruin2017-11-03 17:40:11 +0100
committerAlban Gruin2017-11-03 17:40:11 +0100
commitbb973abfbd566a0f019822453d06f8b0ef3f6dac (patch)
treee8546275cb3e309bcda1573d4b8cf95b01bd9dba /models.py
parent9d364f627dc90f3a361cc9acbc2e91f64ee9edcf (diff)
Prise en compte des groupes qui n’ont pas de sous-groupe dans la liste
des groupes pertinents
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 cb975ab..3af1c06 100644
--- a/models.py
+++ b/models.py
@@ -86,7 +86,7 @@ class GroupManager(Manager):
return self.get_queryset().filter(*args, timetable=timetable, hidden=False, **criteria) \
.annotate(nbsub=Subquery(sub, output_field=models.IntegerField())) \
- .filter(nbsub=1).order_by("name")
+ .filter(Q(nbsub=1) | Q(nbsub__isnull=True)).order_by("name")
class Group(models.Model):