mirror of
https://github.com/django/django.git
synced 2025-11-27 13:55:26 +00:00
Fixed #29338 -- Allowed using combined queryset in Subquery.
Thanks Eugene Kovalev for the initial patch, Simon Charette for the review, and Chetan Khanna for help.
This commit is contained in:
parent
f37face331
commit
30a0144134
3 changed files with 48 additions and 4 deletions
|
|
@ -1048,6 +1048,12 @@ class Query(BaseExpression):
|
|||
clone.bump_prefix(query)
|
||||
clone.subquery = True
|
||||
clone.where.resolve_expression(query, *args, **kwargs)
|
||||
# Resolve combined queries.
|
||||
if clone.combinator:
|
||||
clone.combined_queries = tuple([
|
||||
combined_query.resolve_expression(query, *args, **kwargs)
|
||||
for combined_query in clone.combined_queries
|
||||
])
|
||||
for key, value in clone.annotations.items():
|
||||
resolved = value.resolve_expression(query, *args, **kwargs)
|
||||
if hasattr(resolved, 'external_aliases'):
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue