From d1054d465e463a1d99a46585a1bbfac8cfe4ef47 Mon Sep 17 00:00:00 2001 From: Javi Fontan Date: Thu, 1 Dec 2011 18:03:16 +0000 Subject: [PATCH] fix a bug setting quota configuration --- src/authm_mad/remotes/quota/quota.rb | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) diff --git a/src/authm_mad/remotes/quota/quota.rb b/src/authm_mad/remotes/quota/quota.rb index 1f13234e45..007309ee0c 100644 --- a/src/authm_mad/remotes/quota/quota.rb +++ b/src/authm_mad/remotes/quota/quota.rb @@ -91,7 +91,15 @@ class Quota def initialize conf = YAML.load_file(CONF_FILE) @conf=CONF.merge(conf) {|key,h1,h2| - h1.merge(h2) if h1.instance_of?(Hash) && h2.instance_of?(Hash) + if h1.instance_of?(Hash) && h2.instance_of?(Hash) + h1.merge(h2) + else + if h2 + h2 + else + h1 + end + end } @client = OpenNebula::Client.new