From 39b93e4798c8890f58bfdbc213512494c2c4126f Mon Sep 17 00:00:00 2001 From: Karthik K N Date: Mon, 2 Jan 2017 15:26:56 +0530 Subject: [PATCH] Fix for CAT-2599 - Remove blank options from the dropdown while assigning tag values --- .../provider-tags-aggregation/ProviderTagsAggregation.js | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/server/app/cronjobs/provider-tags-aggregation/ProviderTagsAggregation.js b/server/app/cronjobs/provider-tags-aggregation/ProviderTagsAggregation.js index 516454002..5e3a3e701 100644 --- a/server/app/cronjobs/provider-tags-aggregation/ProviderTagsAggregation.js +++ b/server/app/cronjobs/provider-tags-aggregation/ProviderTagsAggregation.js @@ -12,7 +12,6 @@ ProviderTagsAggregation.execute = providerTagAggregation; module.exports = ProviderTagsAggregation; - function providerTagAggregation() { MasterUtils.getAllActiveOrg(function(err, orgs) { if(err) { @@ -139,12 +138,12 @@ function getResourceTags(tagDetails,resourceDetails,provider,next){ if (tagDetails[tagName].values.indexOf(tagValue) < 0) { tagDetails[tagName].values.push(tagValue); } - } else { + } else if((typeof tagName != undefined) && (tagName != null)) { tagDetails[tagName] = { 'providerId': provider._id, 'orgId': provider.orgId[0], 'name': tagName, - 'values': [tagValue], + 'values': (tagValue == "")?[]:[tagValue], 'new': true } }