From: Wang,Frank(gw1218) Date: Mon, 2 Apr 2018 17:52:28 +0000 (-0500) Subject: Fix a Bug on Checking Required Fields X-Git-Tag: v1.2.0~11^2 X-Git-Url: https://gerrit.onap.org/r/gitweb?p=policy%2Fengine.git;a=commitdiff_plain;h=4682f84bd4ad7ba2bec6b53bfda756e76c92aef4 Fix a Bug on Checking Required Fields Fix a bug in checking required fields if the object has include function Issue-ID: POLICY-717 Change-Id: I766da50c9ac02081dd4e711b8c78be0f3c25e5bd Signed-off-by: Wang,Frank(gw1218) --- diff --git a/POLICY-SDK-APP/src/main/webapp/app/policyApp/policy-models/Editor/PolicyTemplateController/DCAEMicroServicePolicyController.js b/POLICY-SDK-APP/src/main/webapp/app/policyApp/policy-models/Editor/PolicyTemplateController/DCAEMicroServicePolicyController.js index 79f8fddaa..1b4337033 100644 --- a/POLICY-SDK-APP/src/main/webapp/app/policyApp/policy-models/Editor/PolicyTemplateController/DCAEMicroServicePolicyController.js +++ b/POLICY-SDK-APP/src/main/webapp/app/policyApp/policy-models/Editor/PolicyTemplateController/DCAEMicroServicePolicyController.js @@ -1115,11 +1115,13 @@ angular.module('abs').controller('dcaeMicroServiceController', ['$scope', '$wind var star = ""; var required = null; if(lablInfo){ - if(lablInfo.includes("required-true")){ - star = " *"; - required = true; - }else if (lablInfo.includes("required-false")){ - required = false + if(typeof lablInfo === 'string' ){ + if(lablInfo.includes("required-true")){ + star = " *"; + required = true; + }else if (lablInfo.includes("required-false")){ + required = false + } } }