From 839a2c6c66850997b44ca71853a31617c0cf93ed Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Miroslav=20Bajto=C5=A1?= Date: Tue, 20 Dec 2016 11:40:22 +0100 Subject: [PATCH] Fix HasOne.update to propagate options arg --- lib/relation-definition.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/relation-definition.js b/lib/relation-definition.js index 498945a3..754e5574 100644 --- a/lib/relation-definition.js +++ b/lib/relation-definition.js @@ -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))); }