Skip to content
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

Update on I18n_JSON field fails to remove keys if provided keys already exist in object #11473

Open
johnatawnclementawn opened this issue Sep 19, 2024 · 0 comments
Assignees
Labels
Type: Bug Something isn't working

Comments

@johnatawnclementawn
Copy link
Member

johnatawnclementawn commented Sep 19, 2024

When performing an update on an I18n_JSON field, the custom as_sql method seems to only check that the keys to update exist in the set of keys that already exist in the object, rather than checking that the keys provided are the set of keys that exist in the object.

This fails when trying to remove keys during an update, e.g.
original_obj = {"label":"...", "defaultValue":"...", "options":[], "placeholder":"...", "i18n_properties":["placeholder"]}
updated_obj={"label":"...", "placeholder":"...", "i18n_properties":["placeholder"]}

@chiatt chiatt added this to pipeline Sep 19, 2024
@johnatawnclementawn johnatawnclementawn self-assigned this Sep 19, 2024
@johnatawnclementawn johnatawnclementawn moved this to 🏗 In Progress in pipeline Sep 19, 2024
@jacobtylerwalls jacobtylerwalls added the Type: Bug Something isn't working label Sep 19, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Type: Bug Something isn't working
Projects
Status: 🏗 In Progress
Development

No branches or pull requests

2 participants