From 700f544439bfeffa796dd6243f1083d03b70a80c Mon Sep 17 00:00:00 2001 From: juanmont Date: Fri, 24 Nov 2017 12:14:24 +0100 Subject: [PATCH] B #1483: Removed capacity attribute when it's empty --- src/sunstone/public/app/tabs/hosts-tab/form-panels/create.js | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/src/sunstone/public/app/tabs/hosts-tab/form-panels/create.js b/src/sunstone/public/app/tabs/hosts-tab/form-panels/create.js index afe05c9879..2903e2c76c 100644 --- a/src/sunstone/public/app/tabs/hosts-tab/form-panels/create.js +++ b/src/sunstone/public/app/tabs/hosts-tab/form-panels/create.js @@ -262,7 +262,9 @@ define(function(require) { host_json["host"]["region_name"] = region_name; host_json["host"]["ec2_secret"] = ec2_secret; host_json["host"]["ec2_access"] = ec2_access; - host_json["host"]["capacity"] = capacity; + if (capacity.length > 0){ + host_json["host"]["capacity"] = capacity; + } } //Create the OpenNebula.Host. //If it is successfull we refresh the list.