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

fix: duplicate documents with required localized fields #4236

Merged
merged 2 commits into from
Nov 30, 2023

Conversation

DanRibbens
Copy link
Contributor

Description

fixes #4232

This changes how duplicating documents handles errors when other locales are present. The current behavior was creating a document, getting a success toast, then trying to patch each additional locale, if one failed the document was supposed to be deleted entirely. Instead it was not calling delete, so you'd have two toasts, one with a success, one with the validation error and the document would be partially copied.

With this change we always try and create a document and show the first error if it exists, then for every other locale, attempt to patch every other locale and only show one error at the end which lists all the locales that had trouble. Then finally, navigate to the duplicate document.

  • I have read and understand the CONTRIBUTING.md document in this repository.

Type of change

  • Bug fix (non-breaking change which fixes an issue)

Checklist:

  • I have added tests that prove my fix is effective or that my feature works
  • Existing test suite passes locally with my changes

@DanRibbens DanRibbens merged commit 9da9b1f into main Nov 30, 2023
29 checks passed
@DanRibbens DanRibbens deleted the fix/#4232-duplicate-required-localized branch November 30, 2023 14:27
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
1 participant