#34808: Some aggregation functions may return None; this isn't well documented
--------------------------------------+------------------------------------
Reporter: Eric Baumgartner | Owner: nobody
Type: Cleanup/optimization | Status: new
Component: Documentation | Version: 4.2
Severity: Normal | Resolution:
Keywords: | Triage Stage: Accepted
Has patch: 0 | Needs documentation: 0
Needs tests: 0 | Patch needs improvement: 0
Easy pickings: 0 | UI/UX: 0
--------------------------------------+------------------------------------
Changes (by Simon Charette):
* cc: Nick Pope (added)
* stage: Unreviewed => Accepted
Comment:
I guess we should augment the
[https://docs.djangoproject.com/en/4.2/topics/db/aggregation/ aggregation
topic] to more clearly highlight the usage of the `Aggregate.default`
option added in 4.0 (see #10929) which was meant to be address this exact
issue by providing [https://github.com/django/django/pull/14026/files
#diff-c7d87b6e6b973bf87e5685442a6c1da9531c24bcaa86fe158c40ea0276986f32R68
a shorthand that avoids wrapping every aggregate] in `Coalesce`
(`Aggregate(default=42)` -> `Coalesce(Aggregate(), 42)`.
Would you be interested in providing documentation adjustments Eric?
--
Ticket URL: <https://code.djangoproject.com/ticket/34808#comment:1>
Django <https://code.djangoproject.com/>
The Web framework for perfectionists with deadlines.
--
You received this message because you are subscribed to the Google Groups
"Django updates" group.
To unsubscribe from this group and stop receiving emails from it, send an email
to [email protected].
To view this discussion on the web visit
https://groups.google.com/d/msgid/django-updates/0107018a4e6cdf55-51430707-ec72-470a-ad7e-c41cfb0da5a5-000000%40eu-central-1.amazonses.com.