set key as well

not sure if this fixes dupe keys
This commit is contained in:
barisusakli
2014-10-16 02:02:16 -04:00
parent 9e8be432b3
commit df590d01e6

View File

@@ -10,7 +10,7 @@ module.exports = function(db, module) {
if (!key) { if (!key) {
return callback(); return callback();
} }
data._key = key;
db.collection('objects').update({_key: key}, {$set: data}, {upsert: true, w: 1}, function(err) { db.collection('objects').update({_key: key}, {$set: data}, {upsert: true, w: 1}, function(err) {
callback(err); callback(err);
}); });