mirror of
https://github.com/OpenNebula/one.git
synced 2025-03-22 18:50:08 +03:00
bug #3363: rescue exception when trying to parse a plain service template
This commit is contained in:
parent
31f2f805fb
commit
ab7b13b664
@ -1390,7 +1390,12 @@ function initialize_create_service_template_dialog(dialog){
|
||||
}).on('valid', function() {
|
||||
if ($('#create_service_template_form_advanced',dialog).attr("action") == "create") {
|
||||
var json_template = $("#template", this).val();
|
||||
Sunstone.runAction("ServiceTemplate.create", JSON.parse(json_template) );
|
||||
try {
|
||||
Sunstone.runAction("ServiceTemplate.create", JSON.parse(json_template) );
|
||||
} catch(e) {
|
||||
popFormDialog("create_service_template_form", $("#oneflow-templates"));
|
||||
notifyError(e);
|
||||
}
|
||||
return false;
|
||||
} else if ($('#create_service_template_form_advanced',dialog).attr("action") == "update") {
|
||||
var json_template = $("#template", this).val();
|
||||
|
Loading…
x
Reference in New Issue
Block a user