Skip to content

Commit

Permalink
Fixed an issue where on update we weren't returning the new attrs
Browse files Browse the repository at this point in the history
  • Loading branch information
rschmukler committed Nov 15, 2013
1 parent 8de311a commit 3950b7d
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion lib/mongo.js
Original file line number Diff line number Diff line change
Expand Up @@ -60,7 +60,7 @@ module.exports = function(url) {
if(typeof id !== 'object')
id = db.id(id);

return db.findAndModify({_id: id}, {}, {$set: changed}, function(err, doc) {
return db.findAndModify({_id: id}, {}, {$set: changed}, {new: true}, function(err, doc) {
if(err) {
// Check for duplicate index
if(err.code == 11000) {
Expand Down

0 comments on commit 3950b7d

Please sign in to comment.