Merge pull request #1201 from strongloop/fix/options-propagation-2x

Fix HasOne.update to propagate options arg
This commit is contained in:
Miroslav Bajtoš 2016-12-21 10:40:29 +01:00 committed by GitHub
commit 71ef3dd095
1 changed files with 1 additions and 1 deletions

View File

@ -1745,7 +1745,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)));
}