Skip to content

Commit

Permalink
Fixed a bug where mongo wasn't giving updated document
Browse files Browse the repository at this point in the history
  • Loading branch information
rschmukler committed Nov 15, 2013
1 parent 704ce0e commit 0da75d9
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion lib/agenda.js
Expand Up @@ -102,7 +102,7 @@ Agenda.prototype.saveJob = function(job, cb) {
this._db.findAndModify({name: props.name, type: 'single'}, {}, {$set: props}, {upsert: true, new: true}, processDbResult);
else {
if(job.attrs._id) {
this._db.findAndModify({_id: job.attrs._id}, {}, {$set: props}, processDbResult);
this._db.findAndModify({_id: job.attrs._id}, {}, {$set: props}, {new: true}, processDbResult);
}
else {
this._db.insert(props, processDbResult);
Expand Down

0 comments on commit 0da75d9

Please sign in to comment.