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: correctly scopes data variable within bulk update - #2901 #2904

Merged
merged 2 commits into from
Jun 26, 2023

Conversation

JarrodMFlesch
Copy link
Contributor

@JarrodMFlesch JarrodMFlesch commented Jun 26, 2023

Description

Fixes #2901

The issue was caused by data being stored outside of the promises. This lead to stale data being set and accessed when setting/passing data within the bulk update operation.

I also removed the code related to files. I found it counterintuitive to even think about files when bulk updating an upload enabled collection. The admin panel does not allow upload enabled collections to replace all files with one file when performing a bulk update. The code removal aligns the API with the admin panel UI/UX, as it would be strange to replace all files with one file.

  • 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
  • I have made corresponding changes to the documentation

@JarrodMFlesch JarrodMFlesch changed the title fix: correctly scope data variable inside looped promises - #2901 fix: correctly scope data variable within bulk update - #2901 Jun 26, 2023
@JarrodMFlesch JarrodMFlesch changed the title fix: correctly scope data variable within bulk update - #2901 fix: correctly scopes data variable within bulk update - #2901 Jun 26, 2023
@JarrodMFlesch JarrodMFlesch merged commit f627277 into master Jun 26, 2023
@JarrodMFlesch JarrodMFlesch deleted the fix/2901-bulk-update-stale-data branch June 26, 2023 15:56
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.

Possible issue with beforeValidate/beforeChange hook when updating multiple documents
1 participant