Fix HasOne.update to propagate options arg

This commit is contained in:
Miroslav Bajtoš 2016-12-20 11:40:22 +01:00
parent d99dca6fc0
commit 0d862890e0
1 changed files with 1 additions and 1 deletions

View File

@ -1743,7 +1743,7 @@ HasOne.prototype.update = function(targetModelData, options, cb) {
this.fetch(function(err, targetModel) {
if (targetModel instanceof ModelBaseClass) {
delete targetModelData[fk];
targetModel.updateAttributes(targetModelData, cb);
targetModel.updateAttributes(targetModelData, options, cb);
} else {
cb(new Error(g.f('{{HasOne}} relation %s is empty', definition.name)));
}