summaryrefslogtreecommitdiff
path: root/docs/ref
diff options
context:
space:
mode:
authorGuillaume Pannatier <guillaume.pannatier@gmail.com>2014-06-04 15:58:28 +0200
committerTim Graham <timograham@gmail.com>2014-06-04 12:45:27 -0400
commit08bd249fa2ac938d35b93b2686c0c439ca160127 (patch)
treed3a5a356ada9f954f4bed68ee139d41b0f5a569a /docs/ref
parent734e9ad2320682c1817f2a70b37880c0b208b398 (diff)
[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
Diffstat (limited to 'docs/ref')
-rw-r--r--docs/ref/models/querysets.txt7
1 files changed, 4 insertions, 3 deletions
diff --git a/docs/ref/models/querysets.txt b/docs/ref/models/querysets.txt
index 1344c6744b..74199e3de1 100644
--- a/docs/ref/models/querysets.txt
+++ b/docs/ref/models/querysets.txt
@@ -2489,9 +2489,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
~~~