[1.6.x] Fixed #22710 -- Amended aggregation note for empty QuerySets
Thanks smeaton for report and Joël Rochat for spell check Backport of 7f27cca5c5 from master
This commit is contained in:
parent
734e9ad232
commit
08bd249fa2
@ -2489,9 +2489,10 @@ aggregate functions, see
|
|||||||
|
|
||||||
.. admonition:: Note
|
.. admonition:: Note
|
||||||
|
|
||||||
Aggregation functions will return ``None`` when used with an empty
|
Aggregation functions return ``None`` when used with an empty
|
||||||
``QuerySet``. For example, the ``Count`` aggregation function will return
|
``QuerySet``. For example, the ``Sum`` aggregation function returns ``None``
|
||||||
``None`` instead of ``0`` if the ``QuerySet`` contains no entries.
|
instead of ``0`` if the ``QuerySet`` contains no entries. An exception is
|
||||||
|
``Count``, which does return ``0`` if the ``QuerySet`` is empty.
|
||||||
|
|
||||||
Avg
|
Avg
|
||||||
~~~
|
~~~
|
||||||
|
Loading…
x
Reference in New Issue
Block a user