Commit e54fe04d by kevalbhatt Committed by Madhan Neethiraj

ATLAS-1638: fix - ui sends same GUID while assigning a tag to multiple entities

parent 40e2e37d
...@@ -165,7 +165,7 @@ define(['require', ...@@ -165,7 +165,7 @@ define(['require',
this.searchCollection.find(function(item) { this.searchCollection.find(function(item) {
if (item.get('isEnable')) { if (item.get('isEnable')) {
var term = []; var term = [];
var obj = model.toJSON(); var obj = item.toJSON();
that.arr.push({ that.arr.push({
id: obj.guid, id: obj.guid,
model: obj model: obj
...@@ -481,13 +481,13 @@ define(['require', ...@@ -481,13 +481,13 @@ define(['require',
getTagList: function(guid, multiple) { getTagList: function(guid, multiple) {
var that = this; var that = this;
if (!multiple || multiple.length === 0) { if (!multiple || multiple.length === 0) {
var modal = this.searchCollection.find(function(item) { var model = this.searchCollection.find(function(item) {
var obj = model.toJSON(); var obj = item.toJSON();
if (obj.guid === guid) { if (obj.guid === guid) {
return true; return true;
} }
}); });
if (modal) { if (model) {
var obj = model.toJSON(); var obj = model.toJSON();
} else { } else {
return []; return [];
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment