Fix a Bug on Checking Required Fields 41/40541/4
authorWang,Frank(gw1218) <gw1218@att.com>
Mon, 2 Apr 2018 17:52:28 +0000 (12:52 -0500)
committerWang,Frank(gw1218) <gw1218@att.com>
Mon, 2 Apr 2018 20:40:55 +0000 (15:40 -0500)
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) <gw1218@att.com>
POLICY-SDK-APP/src/main/webapp/app/policyApp/policy-models/Editor/PolicyTemplateController/DCAEMicroServicePolicyController.js

index 79f8fdd..1b43370 100644 (file)
@@ -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
+                           }
                        }
                }