﻿id	summary	reporter	owner	description	type	status	component	version	severity	resolution	keywords	cc	stage	has_patch	needs_docs	needs_tests	needs_better_patch	easy	ui_ux
34648	`get_prep_value` now being called for JSONField	Shaheed Haque	nobody	"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:

​https://github.com/python-social-auth/social-app-django/blob/8d0a2052d1b22a899454571c62237d23aa25af97/social_django/storage.py#L24

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.




"	Bug	closed	Uncategorized	4.2	Normal	duplicate			Unreviewed	0	0	0	0	0	0
