diff options
| author | Mariusz Felisiak <felisiak.mariusz@gmail.com> | 2017-06-13 08:16:16 +0200 |
|---|---|---|
| committer | Mariusz Felisiak <felisiak.mariusz@gmail.com> | 2017-06-13 08:33:26 +0200 |
| commit | 44e29ea1e906859e85bb2a46ae5ea9d82bd96f5f (patch) | |
| tree | bc22ec611fad767850afc27d4dc8c6f7874d891e /django/db/models/sql/compiler.py | |
| parent | 927d9b51fee2442280ae975b21b98b5a705c4b17 (diff) | |
[1.11.x] Fixed #28293 -- Fixed union(), intersection(), and difference() when combining with an EmptyQuerySet.
Thanks Jon Dufresne for the report and Tim Graham for the review.
Backport of 82175ead723f8fa3f9271fbd4b24275097029aab from master
Diffstat (limited to 'django/db/models/sql/compiler.py')
| -rw-r--r-- | django/db/models/sql/compiler.py | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/django/db/models/sql/compiler.py b/django/db/models/sql/compiler.py index 9acb56aa84..d1373fcf95 100644 --- a/django/db/models/sql/compiler.py +++ b/django/db/models/sql/compiler.py @@ -379,7 +379,7 @@ class SQLCompiler(object): features = self.connection.features compilers = [ query.get_compiler(self.using, self.connection) - for query in self.query.combined_queries + for query in self.query.combined_queries if not query.is_empty() ] if not features.supports_slicing_ordering_in_compound: for query, compiler in zip(self.query.combined_queries, compilers): |
