-
Notifications
You must be signed in to change notification settings - Fork 144
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Fix bulk_update() on I18n_JSON fields for homogenous values #10618 #10620
Conversation
071895c
to
44127d5
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
looks good to me. How should we remind ourselves to remove this code once we move to Django 5.1? A deprecation warning?
Good call. I guess I'm hopeful it will be fixed in 5.1, but we don't know. I can take the test that currently has an expected failure decorator and make it more specific to assert against |
38eec93
to
5bea799
Compare
Retargeted 7.6, as this isn't really important enough to go back to 7.5, just adding safety for development. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
looks good
Types of changes
Description of Change
Before, there was silent data loss when using
bulk_update()
on I18n_JSON fields such as node, datatype, widget, plugin configs.Now, we at least allow bulk_updates to homogenous values. Heterogenous values (not yet supported) throw an error to prevent a silent failure.
The situation may improve in Django 5.1 if someone submits a PR with the patch identified in this ticket. Maybe that someone is one of us? :D
Issues Solved
Closes #10618
Opened a followup #10619 for the issue demo'd in the skipped test.
Checklist
Ticket Background