﻿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
34644	social-app-django's JSONField doesn't work as expected.	Shaheed Haque	nobody	"#34539 introduced a change to 4.2.2 which seems to have broken the social_django code I use. AFAIK, the old behaviour was present well before the apparent regression noted in #34539 between 4.1 and 4.2.

I'm not especially knowledgeable about the issues debated above, but here is what I see. First, social_django sets a JSONField {{{extra_data}}} and then saves the value here:

​https://github.com/python-social-auth/social-app-django/blob/8d0a2052d1b22a899454571c62237d23aa25af97/social_django/storage.py#L24

Second, on the stack, I have the frames shown in the attachment ""stack frames"". The important point is that when I enter the two new lines of code added in #34539, {{{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 while previously, the dict was saved as expected. I believe that to be incorrect.

(Perhaps the intent here was to only have this change apply to subclasses of JSONField?)

Advice appreciated."	Uncategorized	closed	Database layer (models, ORM)	4.2	Normal	invalid			Unreviewed	0	0	0	0	0	0
