Fixed remove properties not being correctly bulk written
This commit is contained in:
@@ -35,8 +35,13 @@ export default function mutationToPropUpdates(mutation: Mutation) {
|
|||||||
}
|
}
|
||||||
// Remove creature properties
|
// Remove creature properties
|
||||||
if (mutation.removals) for (const removeOne of mutation.removals) {
|
if (mutation.removals) for (const removeOne of mutation.removals) {
|
||||||
|
console.log(removeOne);
|
||||||
bulkWriteOps.push({
|
bulkWriteOps.push({
|
||||||
removeOne,
|
deleteOne: {
|
||||||
|
filter: {
|
||||||
|
_id: removeOne.propId
|
||||||
|
},
|
||||||
|
},
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
return bulkWriteOps;
|
return bulkWriteOps;
|
||||||
|
|||||||
Reference in New Issue
Block a user