mirror of
https://github.com/django/django.git
synced 2025-08-22 03:24:21 +00:00
Fixed #34551 -- Fixed QuerySet.aggregate() crash when referencing subqueries.
Regression in 59bea9efd2
.
Refs #28477.
Thanks Denis Roldán and Mariusz for the test.
This commit is contained in:
parent
2ee01747c3
commit
e5c844d6f2
4 changed files with 31 additions and 0 deletions
|
@ -1541,6 +1541,7 @@ class Subquery(BaseExpression, Combinable):
|
|||
template = "(%(subquery)s)"
|
||||
contains_aggregate = False
|
||||
empty_result_set_value = None
|
||||
subquery = True
|
||||
|
||||
def __init__(self, queryset, output_field=None, **extra):
|
||||
# Allow the usage of both QuerySet and sql.Query objects.
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue