From 94d60e71de2eead4bce9f361a0fce9ce2b826b84 Mon Sep 17 00:00:00 2001 From: Jorge Miguel Lobo Escalona Date: Wed, 2 Feb 2022 11:38:43 +0100 Subject: [PATCH] F #5720: Fix Sunstone error popup (#1743) Show Popup when the template does not have the VMGROUP_ID --- src/sunstone/public/app/utils/vmgroup-section.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/sunstone/public/app/utils/vmgroup-section.js b/src/sunstone/public/app/utils/vmgroup-section.js index 6b259a9968..d633c23746 100644 --- a/src/sunstone/public/app/utils/vmgroup-section.js +++ b/src/sunstone/public/app/utils/vmgroup-section.js @@ -90,14 +90,14 @@ define(function(require) { }); $("#role_section",context).hide(); $(".role_table_section", context).prop("required", false); - if(template_json.VMTEMPLATE.TEMPLATE.VMGROUP){ + if(template_json.VMTEMPLATE.TEMPLATE.VMGROUP && template_json.VMTEMPLATE.TEMPLATE.VMGROUP.VMGROUP_ID){ this.vmGroupTable.selectResourceTableSelect({ids:template_json.VMTEMPLATE.TEMPLATE.VMGROUP.VMGROUP_ID}); _generate_provision_role_table(context, template_json.VMTEMPLATE.TEMPLATE.VMGROUP.VMGROUP_ID, template_json.VMTEMPLATE.TEMPLATE.VMGROUP.ROLE); } } function _fill(context, templateJSON, vmGroupTable){ - if(templateJSON.VMGROUP){ + if(templateJSON.VMGROUP && templateJSON.VMGROUP.VMGROUP_ID){ var element = templateJSON.VMGROUP; vmGroupTable.selectResourceTableSelect({ids:element.VMGROUP_ID}); _generate_provision_role_table(context,element.VMGROUP_ID, element.ROLE);