#34648 closed Bug (duplicate)
`get_prep_value` now being called for JSONField
Reported by: | Shaheed Haque | Owned by: | nobody |
---|---|---|---|
Component: | Uncategorized | Version: | 4.2 |
Severity: | Normal | Keywords: | |
Cc: | Triage Stage: | Unreviewed | |
Has patch: | no | Needs documentation: | no |
Needs tests: | no | Patch needs improvement: | no |
Easy pickings: | no | UI/UX: | no |
Description
In #34539, a change was made in 4.2.2 which I think causes a regression in the expected/normal behaviour of JSONField. I ought to point out that I have reviewed the discussion in #34539 but I am not sufficiently knowledgeable to say if/how valid the arguments there are.
The behaviour change is in an add-on Django app called social-django, which sets a JSONField called extra_data
and then save()s the model instance here:
On the stack, I have the frames show in the attachment "stack frame", and the important point is that when I enter the two lines of code added in #34539, the value
is a dict, but is flattened into a string by the new code. The result is that the database JSONField has the saved string instead of the dict as expected. I believe that to be incorrect.
Please advise.
Attachments (1)
Change History (4)
by , 16 months ago
comment:1 by , 16 months ago
Resolution: | → invalid |
---|---|
Status: | new → closed |
comment:3 by , 16 months ago
Resolution: | invalid → duplicate |
---|
stack frames