diff options
Diffstat (limited to 'django/db/models/sql/query.py')
| -rw-r--r-- | django/db/models/sql/query.py | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/django/db/models/sql/query.py b/django/db/models/sql/query.py index 5100869b34..b3f130c0b4 100644 --- a/django/db/models/sql/query.py +++ b/django/db/models/sql/query.py @@ -696,6 +696,7 @@ class Query(BaseExpression): # except if the alias is the base table since it must be present in the # query on both sides. initial_alias = self.get_initial_alias() + rhs = rhs.clone() rhs.bump_prefix(self, exclude={initial_alias}) # Work out how to relabel the rhs aliases, if necessary. |
