Kaydet (Commit) 7f27cca5 authored tarafından Guillaume Pannatier's avatar Guillaume Pannatier Kaydeden (comit) Tim Graham

Fixed #22710 -- Amended aggregation note for empty QuerySets

Thanks smeaton for report and Joël Rochat for spell check
üst 2f7a7842
......@@ -2633,9 +2633,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
~~~
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment