summaryrefslogtreecommitdiff
path: root/docs
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:24 -0400
commit52b7e772e4da846efb2d75b22ec05c7105091b76 (patch)
tree647a98d57173e98fe105dca68e2f4fcf5646d9da /docs
parent868b5e5e957eae6d88be12b2e52ca971de81ed8d (diff)
[1.7.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')
-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 2cc05e6a67..6aa8b32a54 100644
--- a/docs/ref/models/querysets.txt
+++ b/docs/ref/models/querysets.txt
@@ -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
~~~