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
I played arround some more. The error has nothing to do with the CharField. It occurs when setting the primary key of the model. Here is a test that fails (in his first line):
@ostcar unfortunately I'm not sure how to solve this one.
The problem is being able to determine when a form is new vs when it's already been saved. This is needed to know when a string has already been JSON encoded.
In this case, you're passing an ID in which is tripping up the mechanism we use to perform this check.
Since there is a workaround, I'm going to suggest using that and close this. Sorry I don't have a better answer here.
If the primary key of a model with a JSONField is a CharField, a ValidateError occurs when setting the jsonfield.
Here are some tests that fail:
The text was updated successfully, but these errors were encountered: