aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-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):