diff options
| author | Mariusz Felisiak <felisiak.mariusz@gmail.com> | 2019-06-19 10:44:53 +0200 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2019-06-19 10:44:53 +0200 |
| commit | 14d026cccb144c6877294ba4cd4e03ebf0842498 (patch) | |
| tree | b3f2ad248aec2b040a5860e6ddc4c27db4329b5b /django | |
| parent | a7038adbd02c916315b16939b835f021c2ee8880 (diff) | |
Fixed #30572 -- Prevented values()/values_list() on combined queryset from mutating the list of columns in querysets.
Diffstat (limited to 'django')
| -rw-r--r-- | django/db/models/sql/compiler.py | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/django/db/models/sql/compiler.py b/django/db/models/sql/compiler.py index a44adfc760..a791908caf 100644 --- a/django/db/models/sql/compiler.py +++ b/django/db/models/sql/compiler.py @@ -426,6 +426,7 @@ class SQLCompiler: # must have the same columns list. Set the selects defined on # the query on all combined queries, if not already set. if not compiler.query.values_select and self.query.values_select: + compiler.query = compiler.query.clone() compiler.query.set_values(( *self.query.extra_select, *self.query.values_select, |
