diff options
author | Alban Gruin | 2017-11-03 17:40:11 +0100 |
---|---|---|
committer | Alban Gruin | 2017-11-03 17:40:11 +0100 |
commit | bb973abfbd566a0f019822453d06f8b0ef3f6dac (patch) | |
tree | e8546275cb3e309bcda1573d4b8cf95b01bd9dba /models.py | |
parent | 9d364f627dc90f3a361cc9acbc2e91f64ee9edcf (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.py | 2 |
1 files changed, 1 insertions, 1 deletions
@@ -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): |