mirror of
https://github.com/django/django.git
synced 2025-11-28 22:49:09 +00:00
Fixed #33073 -- Fixed queryset crash with aggregation and empty/extra queryset annotation.
This commit is contained in:
parent
338fc0e7f1
commit
691486a5cf
2 changed files with 15 additions and 1 deletions
|
|
@ -1692,7 +1692,7 @@ class Query(BaseExpression):
|
|||
yield expr
|
||||
elif include_external and callable(getattr(expr, 'get_external_cols', None)):
|
||||
yield from expr.get_external_cols()
|
||||
else:
|
||||
elif hasattr(expr, 'get_source_expressions'):
|
||||
yield from cls._gen_cols(
|
||||
expr.get_source_expressions(),
|
||||
include_external=include_external,
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue