Created
November 25, 2016 09:15
-
-
Save hyperNURb/f5a70f56ae481d69937fb5b8aeb5a99c to your computer and use it in GitHub Desktop.
Revisions
-
hyperNURb created this gist
Nov 25, 2016 .There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -0,0 +1,26 @@ diff --git a/src/ggrc/assets/javascripts/apps/custom_attributes.js b/src/ggrc/assets/javascripts/apps/custom_attributes.js index d6a3503..4f3136b 100644 --- a/src/ggrc/assets/javascripts/apps/custom_attributes.js +++ b/src/ggrc/assets/javascripts/apps/custom_attributes.js @@ -51,8 +51,9 @@ helpers: { with_value_for_id: function (id, options) { var ret; + var instance = this.attr('instance'); id = Mustache.resolve(id); - can.each(this.instance.custom_attribute_values, function (value) { + can.each(instance.custom_attribute_values, function (value) { value = value.reify(); if (value.custom_attribute_id === id) { ret = value.attribute_value; @@ -64,8 +65,9 @@ }, with_object_for_id: function (id, options) { var ret; + var instance = this.attr('instance'); id = Mustache.resolve(id); - can.each(this.instance.custom_attribute_values, function (value) { + can.each(instance.custom_attribute_values, function (value) { value = value.reify(); if (value.custom_attribute_id === id) { ret = value.attribute_object;