#34435: JSONField with string default raises fields.E010 warning.
--------------------------------------+------------------------------------
Reporter: Tobias Krönke | Owner: nobody
Type: Bug | Status: new
Component: Core (System checks) | Version: 4.1
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 Mariusz Felisiak):
* cc: Sage Abdullah (added)
* type: Uncategorized => Bug
* component: Uncategorized => Core (System checks)
* stage: Unreviewed => Accepted
Comment:
Thanks for the report. Agreed, we should fix this, especially since it is
clearly
[https://docs.djangoproject.com/en/stable/ref/models/fields/#jsonfield
documented] as correct:
> ''"If you give the field a `default`, ensure it’s an immutable object,
**such as a `str`**, or a callable object that returns ..."''
--
Ticket URL: <https://code.djangoproject.com/ticket/34435#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/0107018713a00bf6-64b7d8a0-cc10-4ae2-a8dc-e5895a47df6f-000000%40eu-central-1.amazonses.com.