#29147: Postgres JSONField missing to_python
--------------------------------------------+------------------------
Reporter: Javier Buzzi | Owner: (none)
Type: Bug | Status: new
Component: contrib.postgres | Version: 1.9
Severity: Normal | Keywords:
Triage Stage: Unreviewed | Has patch: 0
Needs documentation: 0 | Needs tests: 0
Patch needs improvement: 0 | Easy pickings: 1
UI/UX: 0 |
--------------------------------------------+------------------------
Every other field implements a to_python except for JSONField:
https://github.com/django/django/blob/master/django/contrib/postgres/fields/hstore.py#L38
https://github.com/django/django/blob/master/django/contrib/postgres/fields/array.py#L102
https://github.com/django/django/blob/master/django/contrib/postgres/fields/ranges.py#L47
JSONField defaults to the value, meaning if you pass `'{"object":
"value"}'` you get back `'{"object": "value"}'`. The same example in
HStoreField, you pass in `'{"object": "value"}'` you get back `{"object":
"value"}` -- makes the world of difference.
--
Ticket URL: <https://code.djangoproject.com/ticket/29147>
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 post to this group, send email to [email protected].
To view this discussion on the web visit
https://groups.google.com/d/msgid/django-updates/054.a36e430eb000bfe96422f349a410fd3a%40djangoproject.com.
For more options, visit https://groups.google.com/d/optout.