The updateAttribute callback doesn't behaves as its described. It should send the object instance alongside the error too.
This commit is contained in:
parent
e1bd92b52a
commit
e4527856ad
|
@ -577,7 +577,7 @@ AbstractClass.prototype.updateAttributes = function updateAttributes(data, cb) {
|
||||||
inst.isValid(function (valid) {
|
inst.isValid(function (valid) {
|
||||||
if (!valid) {
|
if (!valid) {
|
||||||
if (cb) {
|
if (cb) {
|
||||||
cb(new Error('Validation error'));
|
cb(new Error('Validation error'), inst);
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
update();
|
update();
|
||||||
|
|
Loading…
Reference in New Issue