Skip to content

Commit

Permalink
resolves #508
Browse files Browse the repository at this point in the history
  • Loading branch information
rsercano committed Jun 10, 2019
1 parent 9e41cbf commit ded136a
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion server/imports/methods/mongodb/collection.js
Expand Up @@ -192,7 +192,7 @@ Meteor.methods({

saveFindResult({ selectedCollection, updateObjects, deletedObjectIds, addedObjects, sessionId }) {
for (let i = 0; i < updateObjects.length; i += 1) {
const result = MongoDB.execute({ selectedCollection, methodArray: [{ updateOne: [{ _id: updateObjects[i]._id }, { $set: updateObjects[i] }, {}] }], sessionId });
const result = MongoDB.execute({ selectedCollection, methodArray: [{ replaceOne: [{ _id: updateObjects[i]._id }, updateObjects[i], {}] }], sessionId });
if (result.error) return result;
}
if (deletedObjectIds.length > 0) {
Expand Down

0 comments on commit ded136a

Please sign in to comment.