Commit 52b7e772 authored by Guillaume Pannatier's avatar Guillaume Pannatier Committed by Tim Graham
Browse files

[1.7.x] Fixed #22710 -- Amended aggregation note for empty QuerySets

Thanks smeaton for report and Joël Rochat for spell check

Backport of 7f27cca5 from master
parent 868b5e5e
Loading
Loading
Loading
Loading
+4 −3
Original line number Diff line number Diff line
@@ -2661,9 +2661,10 @@ aggregate functions, see

.. admonition:: Note

    Aggregation functions will return ``None`` when used with an empty
    ``QuerySet``. For example, the ``Count`` aggregation function will return
    ``None`` instead of ``0`` if the ``QuerySet`` contains no entries.
    Aggregation functions return ``None`` when used with an empty
    ``QuerySet``. For example, the ``Sum`` aggregation function returns ``None``
    instead of ``0`` if the ``QuerySet`` contains no entries. An exception is
    ``Count``, which does return ``0`` if the ``QuerySet`` is empty.

Avg
~~~