1
0
mirror of https://github.com/django/django.git synced 2025-07-07 11:19:12 +00:00

[4.0.x] Fixed #33391 -- Clarified Aggregate.empty_result_set_value docs.

Backport of 4400d8568ad5695c46e8de45635a82a27a26b871 from main
This commit is contained in:
Mariusz Felisiak 2021-12-31 06:49:10 +01:00
parent b93fb3d6be
commit fe59bf202d

View File

@ -422,9 +422,8 @@ The ``Aggregate`` API is as follows:
.. versionadded:: 4.0
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.
Defaults to ``None`` since most aggregate functions result in ``NULL``
when applied to an empty result set.
The ``expressions`` positional arguments can include expressions, transforms of
the model field, or the names of model fields. They will be converted to a