From a53478b42b60ae1871938743aef7cdfbf0645945 Mon Sep 17 00:00:00 2001 From: Sergio Betanzos Date: Mon, 24 Feb 2020 17:30:57 +0100 Subject: [PATCH] B #4204: Fix template VMs in Sunstone (#4213) --- .../tabs/templates-tab/form-panels/create-common.js | 13 +++++++------ 1 file changed, 7 insertions(+), 6 deletions(-) diff --git a/src/sunstone/public/app/tabs/templates-tab/form-panels/create-common.js b/src/sunstone/public/app/tabs/templates-tab/form-panels/create-common.js index 1d42570e78..0848b9a85b 100644 --- a/src/sunstone/public/app/tabs/templates-tab/form-panels/create-common.js +++ b/src/sunstone/public/app/tabs/templates-tab/form-panels/create-common.js @@ -255,12 +255,13 @@ define(function(require) { ){ current = currentTemplate[0].VMTEMPLATE.TEMPLATE; } - if( - current && - current.NIC_ALIAS && - !templateJSON.NIC_ALIAS - ){ - delete current.NIC_ALIAS; + if(current) { + if (current.NIC && !templateJSON.NIC) { + delete current.NIC; + } + if(current.NIC_ALIAS && !templateJSON.NIC_ALIAS) { + delete current.NIC_ALIAS; + } } } if (this.action == "create") {