#34644 closed Uncategorized (invalid)
social-app-django's JSONField doesn't work as expected.
Reported by: | Shaheed Haque | Owned by: | nobody |
---|---|---|---|
Component: | Database layer (models, ORM) | 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 (last modified by )
#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:
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.
Attachments (1)
Change History (4)
by , 18 months ago
comment:1 by , 18 months ago
Description: | modified (diff) |
---|
comment:2 by , 18 months ago
Component: | Uncategorized → Database layer (models, ORM) |
---|---|
Resolution: | → invalid |
Status: | new → closed |
Summary: | `get_prep_value` now being called for JSONField → social-app-django's JSONField doesn't work as expected. |
Thanks for the report, however, social-app-django
has custom implementation of JSONField which should be adapted to changes made in 5c23d9f0c32f166c81ecb6f3f01d5077a6084318 and 0ec60661e61b153e6bcec64649b1b7f524eb3e18. Please report this on their issue tracker.
stack frames