From 242f56059d3168170b85da0d011dfc1bd26e800b Mon Sep 17 00:00:00 2001 From: Raymond Feng Date: Wed, 28 Jun 2017 08:33:40 -0700 Subject: [PATCH] Remove the hard-coded writeConcern {w: 1} is not always valid. See https://docs.mongodb.com/manual/reference/write-concern/#write-concern --- .eslintignore | 1 + lib/mongodb.js | 2 +- 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/.eslintignore b/.eslintignore index e69de29bb..4ebc8aea5 100644 --- a/.eslintignore +++ b/.eslintignore @@ -0,0 +1 @@ +coverage diff --git a/lib/mongodb.js b/lib/mongodb.js index d0cfb1fc6..95179c273 100644 --- a/lib/mongodb.js +++ b/lib/mongodb.js @@ -426,7 +426,7 @@ MongoDB.prototype.save = function(model, data, options, callback) { data = self.toDatabase(model, data); - this.execute(model, 'save', data, { w: 1 }, function(err, result) { + this.execute(model, 'save', data, {}, function(err, result) { if (!err) { self.setIdValue(model, data, idValue); idName !== '_id' && delete data._id;