From 2f2a062273bac382dec1f811a76f2b0f5367e3be Mon Sep 17 00:00:00 2001 From: ThaumRystra Date: Mon, 2 Sep 2024 23:29:16 +0200 Subject: [PATCH] Fixed remove properties not being correctly bulk written --- .../api/engine/action/functions/mutationToPropUpdates.ts | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/app/imports/api/engine/action/functions/mutationToPropUpdates.ts b/app/imports/api/engine/action/functions/mutationToPropUpdates.ts index c2afe5b3..d500e17c 100644 --- a/app/imports/api/engine/action/functions/mutationToPropUpdates.ts +++ b/app/imports/api/engine/action/functions/mutationToPropUpdates.ts @@ -35,8 +35,13 @@ export default function mutationToPropUpdates(mutation: Mutation) { } // Remove creature properties if (mutation.removals) for (const removeOne of mutation.removals) { + console.log(removeOne); bulkWriteOps.push({ - removeOne, + deleteOne: { + filter: { + _id: removeOne.propId + }, + }, }); } return bulkWriteOps;