diff options
Diffstat (limited to 'django/db/models/query.py')
| -rw-r--r-- | django/db/models/query.py | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/django/db/models/query.py b/django/db/models/query.py index 663f8bade4..8e753e6455 100644 --- a/django/db/models/query.py +++ b/django/db/models/query.py @@ -1550,6 +1550,8 @@ class QuerySet(AltersData): if len(qs) == 1: return qs[0] return qs[0]._combinator_query("union", *qs[1:], all=all) + elif not other_qs: + return self return self._combinator_query("union", *other_qs, all=all) def intersection(self, *other_qs): |
