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: flattens relationships in the update operation for globals #2766 #2776

Merged
merged 1 commit into from
Jun 5, 2023

Conversation

jacobsfletch
Copy link
Member

@jacobsfletch jacobsfletch commented Jun 5, 2023

Description

Fixes #2766 by flattening relationships within the update operation for globals. This is how collections currently behave, where originalDoc is queried with depth: 0. This resolves misleading validation errors that were throwing on required, non-localized relationship fields when updating with ?locale=. Validation functions were not able to properly resolve because the data was not properly shaped.

  • 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:

  • Existing test suite passes locally with my changes

@jacobsfletch jacobsfletch merged commit 3677cf6 into master Jun 5, 2023
4 checks passed
@jacobsfletch jacobsfletch deleted the fix/global-update branch June 5, 2023 21:22
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.

Relationship required-but-non-localized field validation error when updating global through API
1 participant