B #4204: Fix template VMs in Sunstone (#4213)

This commit is contained in:
Sergio Betanzos authored and GitHub committed 2020-02-24 17:30:57 +01:00
1 parent c78d33f185
commit a53478b42b
1 file changed
+7 -6
@@ -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") {