mirror of
https://github.com/django/django.git
synced 2025-11-30 15:27:52 +00:00
Fixed #33141 -- Renamed Expression.empty_aggregate_value to empty_result_set_value.
This commit is contained in:
parent
9466fd7842
commit
ad36a198a1
8 changed files with 22 additions and 21 deletions
|
|
@ -487,11 +487,11 @@ class Query(BaseExpression):
|
|||
self.default_cols = False
|
||||
self.extra = {}
|
||||
|
||||
empty_aggregate_result = [
|
||||
expression.empty_aggregate_value
|
||||
empty_set_result = [
|
||||
expression.empty_result_set_value
|
||||
for expression in outer_query.annotation_select.values()
|
||||
]
|
||||
elide_empty = not any(result is NotImplemented for result in empty_aggregate_result)
|
||||
elide_empty = not any(result is NotImplemented for result in empty_set_result)
|
||||
outer_query.clear_ordering(force=True)
|
||||
outer_query.clear_limits()
|
||||
outer_query.select_for_update = False
|
||||
|
|
@ -499,7 +499,7 @@ class Query(BaseExpression):
|
|||
compiler = outer_query.get_compiler(using, elide_empty=elide_empty)
|
||||
result = compiler.execute_sql(SINGLE)
|
||||
if result is None:
|
||||
result = empty_aggregate_result
|
||||
result = empty_set_result
|
||||
|
||||
converters = compiler.get_converters(outer_query.annotation_select.values())
|
||||
result = next(compiler.apply_converters((result,), converters))
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue