@dhyasama/totem-models 5.5.0 → 5.5.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/.npmignore +14 -0
- package/lib/Organization.js +4 -0
- package/package-lock.json +1854 -0
- package/package.json +1 -1
package/.npmignore
ADDED
package/lib/Organization.js
CHANGED
|
@@ -1560,6 +1560,10 @@ module.exports = function(mongoose, config) {
|
|
|
1560
1560
|
|
|
1561
1561
|
var self = this;
|
|
1562
1562
|
|
|
1563
|
+
// https://mongoosejs.com/docs/api.html#model_Model.findOneAndUpdate
|
|
1564
|
+
// options runValidators defaults false which is ok since we have upsert false
|
|
1565
|
+
// new returns the updated document
|
|
1566
|
+
|
|
1563
1567
|
self.findOneAndUpdate(filter, update, { upsert: false, new: true }, cb);
|
|
1564
1568
|
|
|
1565
1569
|
};
|