Add missing changed event
This commit is contained in:
parent
cbf99d57a9
commit
a04c13afef
|
@ -229,6 +229,9 @@ DataAccessObject.upsert = DataAccessObject.updateOrCreate = function upsert(data
|
||||||
obj = null;
|
obj = null;
|
||||||
}
|
}
|
||||||
callback(err, obj);
|
callback(err, obj);
|
||||||
|
if(!err) {
|
||||||
|
Model.emit('changed', inst);
|
||||||
|
}
|
||||||
});
|
});
|
||||||
} else {
|
} else {
|
||||||
this.findById(getIdValue(this, data), function (err, inst) {
|
this.findById(getIdValue(this, data), function (err, inst) {
|
||||||
|
|
Loading…
Reference in New Issue