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

feat: consolidates logic in update and updateByID operations #9998

Open
wants to merge 7 commits into
base: main
Choose a base branch
from
Prev Previous commit
Next Next commit
chore: remove duplicative spread
  • Loading branch information
JarrodMFlesch committed Dec 17, 2024
commit d63537089581fe3a8bf46a8ff1f08105aad20862
6 changes: 1 addition & 5 deletions packages/payload/src/collections/operations/update.ts
Original file line number Diff line number Diff line change
Expand Up @@ -165,7 +165,7 @@ export const updateOperation = async <
// Generate data for all files and sizes
// /////////////////////////////////////

const { data: newFileData, files: filesToUpload } = await generateFileData({
const { data, files: filesToUpload } = await generateFileData({
collection,
config,
data: bulkUpdateData,
Expand All @@ -179,10 +179,6 @@ export const updateOperation = async <

const promises = docs.map(async (docWithLocales) => {
const { id } = docWithLocales
const data = {
...newFileData,
...bulkUpdateData,
}

try {
// ///////////////////////////////////////////////
Expand Down
Loading