You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
However, when I generate the schemamigration (using python manage.py schemamigration appname --auto) and migrate, the field on existing model instances for the some_json_field are the string "[]" instead of []
The text was updated successfully, but these errors were encountered:
We've seen a similar problem with a field default of "{}", which is intended to be an empty JSON object but gets encoded as the literal unicode string "{}". I couldn't figure out exactly where this goes wrong, so I applied a band-aid in our product: deis/deis#1616
If anyone knows where this might be happening, I would love to debug it and push a fix back upstream to django-json-field. It's worked great for us other than this.
I create a new field on my model as such:
some_json_field = JSONField(default=[], blank=True)
However, when I generate the schemamigration (using python manage.py schemamigration appname --auto) and migrate, the field on existing model instances for the some_json_field are the string
"[]"
instead of[]
The text was updated successfully, but these errors were encountered: