summaryrefslogtreecommitdiff
path: root/docs/ref
diff options
context:
space:
mode:
authorDavid Wobrock <david.wobrock@gmail.com>2021-09-24 22:05:02 +0200
committerMariusz Felisiak <felisiak.mariusz@gmail.com>2021-09-29 20:52:59 +0200
commitaab76433ed585ebe997b94547e0d790605e01ad9 (patch)
tree48329f6a7adebfd0802120150f329d0aac7830d1 /docs/ref
parentcebac15931173b2fc5d8f2b3f4bd69fe1a8a856d (diff)
[4.0.x] Fixed #33141 -- Renamed Expression.empty_aggregate_value to empty_result_set_value.
Backport of ad36a198a12df4dff65992191b3eb0a474e2daac from main
Diffstat (limited to 'docs/ref')
-rw-r--r--docs/ref/models/expressions.txt12
1 files changed, 6 insertions, 6 deletions
diff --git a/docs/ref/models/expressions.txt b/docs/ref/models/expressions.txt
index 64a7136e6e..c0ef4a46d0 100644
--- a/docs/ref/models/expressions.txt
+++ b/docs/ref/models/expressions.txt
@@ -418,11 +418,11 @@ The ``Aggregate`` API is as follows:
allows passing a ``distinct`` keyword argument. If set to ``False``
(default), ``TypeError`` is raised if ``distinct=True`` is passed.
- .. attribute:: empty_aggregate_value
+ .. attribute:: empty_result_set_value
.. versionadded:: 4.0
- Override :attr:`~django.db.models.Expression.empty_aggregate_value` to
+ Override :attr:`~django.db.models.Expression.empty_result_set_value` to
``None`` since most aggregate functions result in ``NULL`` when applied
to an empty result set.
@@ -976,14 +976,14 @@ calling the appropriate methods on the wrapped expression.
in :class:`~django.db.models.expressions.Window`. Defaults to
``False``.
- .. attribute:: empty_aggregate_value
+ .. attribute:: empty_result_set_value
.. versionadded:: 4.0
Tells Django which value should be returned when the expression is used
- to :meth:`aggregate <django.db.models.query.QuerySet.aggregate>` over
- an empty result set. Defaults to :py:data:`NotImplemented` which forces
- the expression to be computed on the database.
+ to apply a function over an empty result set. Defaults to
+ :py:data:`NotImplemented` which forces the expression to be computed on
+ the database.
.. method:: resolve_expression(query=None, allow_joins=True, reuse=None, summarize=False, for_save=False)