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

Remove content item data keys that are no longer valid when item is being created #2444

Conversation

agalin920
Copy link
Contributor

@agalin920 agalin920 commented Jan 9, 2024

See ticket for better context

@agalin920 agalin920 requested a review from shrunyan January 9, 2024 20:34
@agalin920 agalin920 linked an issue Jan 9, 2024 that may be closed by this pull request
@agalin920 agalin920 changed the title Remove content item data keys that are no longer valid when item is b… Remove content item data keys that are no longer valid when item is being created Jan 9, 2024
@zcolah zcolah added the vqa VQA is complete and approved label Jan 10, 2024
@shrunyan
Copy link
Contributor

@agalin920 how does this interact with prior versions which contain the prior field name?

@agalin920
Copy link
Contributor Author

agalin920 commented Jan 16, 2024

@shrunyan This code only affects content item creation not edit so versions are not applicable. When creating a content item it gets 'staged' into indexedDB so it could save keyA but then a user can subsequently delete keyA in the model but going back to item create it will load the 'staged' item from indexedDB which will still have keyA and attempt to create the content item with that keyA which causes the API to fail

@agalin920
Copy link
Contributor Author

agalin920 commented Jan 16, 2024

@shrunyan for edit it seems like the BE handles making sure the content item is updated when model field name is updated including previous versions

@shrunyan shrunyan merged commit af3e869 into master Jan 17, 2024
1 check passed
@shrunyan shrunyan deleted the 2440-content-cannot-create-a-new-item-once-a-fields-api-id-is-updated branch January 17, 2024 20:56
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
vqa VQA is complete and approved
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Content: Cannot Create a New Item Once a Field's API ID is updated
3 participants