The updateAttribute callback doesn't behaves as its described. It should send the object instance alongside the error too.

This commit is contained in:
Dombi Attila 2012-06-26 15:44:57 +03:00
parent e1bd92b52a
commit e4527856ad
1 changed files with 1 additions and 1 deletions

View File

@ -577,7 +577,7 @@ AbstractClass.prototype.updateAttributes = function updateAttributes(data, cb) {
inst.isValid(function (valid) {
if (!valid) {
if (cb) {
cb(new Error('Validation error'));
cb(new Error('Validation error'), inst);
}
} else {
update();