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

(908) Stop continue editing from removing existing embedded objects #9948

Merged

Conversation

pezholio
Copy link
Contributor

@pezholio pezholio commented Feb 18, 2025

Trello card: https://trello.com/c/BsSW5pPS/908-bug-continue-editing-hides-existing-rates

Before, when editing a draft, the details that a user gave overrode the whole details object, meaning all embedded documents were removed.

This assigns only the attributes we’re interested in, as well as merging the details hash from the form input, so anything that hasn’t come from the form remains intact.

I’ve also had to update the organisation_id= method to set the organisation to nil if organisation_id is an empty string.

This ensures the draft in progress banner doesn’t look odd
Before, when editing a draft, the details that a user gave overrode the
whole details object, meaning all embedded documents were removed.

This assigns only the attributes we’re interested in, as well as
merging the details hash from the form input, so anything that hasn’t
come from the form remains intact.

I’ve also had to update the `organisation_id=` method to set the
organisation to nil if `organisation_id` is an empty string.
@pezholio pezholio merged commit aedf496 into main Feb 19, 2025
20 checks passed
@pezholio pezholio deleted the content-modelling/908-bug-continue-editing-hides-existing-rates branch February 19, 2025 10:50
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants