#35946: Postgres ArrayField should convert values when given a list
-------------------------------------+-------------------------------------
Reporter: Zerq | Owner: Tanish
| Yelgoe
Type: Bug | Status: closed
Component: contrib.postgres | Version:
Severity: Normal | Resolution: wontfix
Keywords: ArrayField | Triage Stage:
to_python | Unreviewed
Has patch: 0 | Needs documentation: 0
Needs tests: 0 | Patch needs improvement: 0
Easy pickings: 1 | UI/UX: 0
-------------------------------------+-------------------------------------
Changes (by Jacob Walls):
* cc: Mike Lissner (added)
Comment:
There are similar issues with `HStoreField.to_python()` and
`CompositePrimaryKey.to_python()`.
By contrast, `RangeField.to_python()` *does* run `to_python()` on
individual components when given a list.
More interestingly, various ''form'' fields, including for `ArrayField`
itself (`postgres.forms.SimpleArrayField`), run `to_python()` on
individual components when given a list.
I think this is ripe for a standardization. I'll try to get some findings
into a forum post to support reframing this one.
I ended up here during review of #36865--which is going to start
leveraging `to_python()` more during admin searches--and investigating the
behavior difference between model `to_python()` and form `to_python()`.
--
Ticket URL: <https://code.djangoproject.com/ticket/35946#comment:6>
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/0107019c0585df32-278e4218-9d82-4a6c-b6cb-2fae511b5337-000000%40eu-central-1.amazonses.com.