diff --git a/lib/helpers/model/castBulkWrite.js b/lib/helpers/model/castBulkWrite.js index 0455562f461..8e47afce706 100644 --- a/lib/helpers/model/castBulkWrite.js +++ b/lib/helpers/model/castBulkWrite.js @@ -71,7 +71,6 @@ module.exports = function castBulkWrite(originalModel, op, options) { overwrite: false, upsert: op['updateOne'].upsert }); - } catch (error) { return callback(error, null); } @@ -152,6 +151,7 @@ module.exports = function castBulkWrite(originalModel, op, options) { if (error) { return callback(error, null); } + op['replaceOne']['replacement'] = op['replaceOne']['replacement'].toBSON(); callback(null); }); };