From 62546b83d311159d3f0da8d68c66f0e7f6dd84ff Mon Sep 17 00:00:00 2001 From: Wei Zhou Date: Fri, 27 Mar 2020 06:32:45 +0000 Subject: [PATCH] UI bug fix: Cannot deploy VM from ISO --- ui/scripts/instanceWizard.js | 18 ++++++++++-------- 1 file changed, 10 insertions(+), 8 deletions(-) diff --git a/ui/scripts/instanceWizard.js b/ui/scripts/instanceWizard.js index a6fdfbb3b952..e85ab298a066 100644 --- a/ui/scripts/instanceWizard.js +++ b/ui/scripts/instanceWizard.js @@ -960,14 +960,16 @@ } }); - $.ajax({ - url: createURL("listTemplateOvfProperties&id=" + selectedTemplateObj.id), - dataType: "json", - async: false, - success: function(json) { - ovfProps = json.listtemplateovfpropertiesresponse.ovfproperty; - } - }); + if (selectedTemplateObj) { + $.ajax({ + url: createURL("listTemplateOvfProperties&id=" + selectedTemplateObj.id), + dataType: "json", + async: false, + success: function(json) { + ovfProps = json.listtemplateovfpropertiesresponse.ovfproperty; + } + }); + } var $step = $('.step.sshkeyPairs:visible'); if (ovfProps == null || ovfProps.length === 0) {