Merge pull request #641 from rus0000/rus0000-patch-1-fix-promise
Fix promise chaining in case of error
This commit is contained in:
commit
103b21a717
|
@ -2246,9 +2246,10 @@ DataAccessObject.prototype.updateAttributes = function updateAttributes(data, op
|
|||
var err = new Error('id property (' + idName + ') ' +
|
||||
'cannot be updated from ' + inst[idName] + ' to ' + data[idName]);
|
||||
err.statusCode = 400;
|
||||
return process.nextTick(function() {
|
||||
process.nextTick(function() {
|
||||
cb(err);
|
||||
});
|
||||
return cb.promise;
|
||||
}
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in New Issue