#27003: ArrayField and JSONField form fields fail on already converted values
--------------------------------------+------------------------------------
Reporter: brandonchinn178 | Owner: nobody
Type: Bug | Status: new
Component: Forms | Version: 1.10
Severity: Normal | Resolution:
Keywords: postgres, arrayfield | Triage Stage: Accepted
Has patch: 1 | Needs documentation: 0
Needs tests: 0 | Patch needs improvement: 1
Easy pickings: 1 | UI/UX: 0
--------------------------------------+------------------------------------
Comment (by brandonchinn178):
For JSONField, what about making a custom `six.text_type` for converted
strings, like #25532:
{{{
class JsonStr(six.text_type):
pass
def to_python(self, value):
...
if isinstance(value, JsonStr):
return value
val = json.loads(value)
# parse val and convert all strings to JsonStr
}}}
--
Ticket URL: <https://code.djangoproject.com/ticket/27003#comment:5>
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/073.b27b8ce525f0e8b8b73bf425f9155b1a%40djangoproject.com.
For more options, visit https://groups.google.com/d/optout.