From d7cc47e76214166335d30a1fb178d999d47ae23f Mon Sep 17 00:00:00 2001 From: Daniel Molina Date: Tue, 30 Jul 2013 18:53:40 +0200 Subject: [PATCH] bug #2220: Update quota cannot create 2 quotas for the same type of resource --- src/sunstone/public/js/sunstone-util.js | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/src/sunstone/public/js/sunstone-util.js b/src/sunstone/public/js/sunstone-util.js index d940a86587..8df21114d8 100644 --- a/src/sunstone/public/js/sunstone-util.js +++ b/src/sunstone/public/js/sunstone-util.js @@ -1519,7 +1519,10 @@ function setupQuotasDialog(dialog){ var json = JSON.parse($(this).attr('quota')); var type = json['TYPE']; delete json['TYPE']; - obj[type.toUpperCase()] = json; + if (typeof obj[type.toUpperCase()] == "undefined") { + obj[type.toUpperCase()] = []; + } + obj[type.toUpperCase()].push(json); }); var action = $('div.form_buttons button',this).val();