#36638: The default for ArrayAgg should be an empty list rather than None
-------------------------------------+-------------------------------------
Reporter: Markus Amalthea | Owner: (none)
Magnuson |
Type: Uncategorized | Status: closed
Component: contrib.postgres | Version: 5.2
Severity: Normal | Resolution: invalid
Keywords: ArrayAgg | Triage Stage:
| Unreviewed
Has patch: 0 | Needs documentation: 0
Needs tests: 0 | Patch needs improvement: 0
Easy pickings: 0 | UI/UX: 0
-------------------------------------+-------------------------------------
Comment (by Simon Charette):
> You can use `default=Value([])` if you prefer.
You don't have to do the `Values` wrapping, passing `default=[]` works
just fine.
`Value` wrapping is only necessary when passing a `str` literal as they
default to field references instead of literals like any other Python
literal does (`'field'` is equivalent `F('field')`)
--
Ticket URL: <https://code.djangoproject.com/ticket/36638#comment:2>
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 visit
https://groups.google.com/d/msgid/django-updates/01070199aad902c8-6583a187-3760-4d29-95de-c6b843d65469-000000%40eu-central-1.amazonses.com.