Skip to content

Instantly share code, notes, and snippets.

@dmamolina
Created December 16, 2011 16:53
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save dmamolina/9218f1b5b5fc19bc58ec to your computer and use it in GitHub Desktop.
Save dmamolina/9218f1b5b5fc19bc58ec to your computer and use it in GitHub Desktop.
diff --git a/src/authm_mad/remotes/quota/quota.rb b/src/authm_mad/remotes/quota/quota.rb
index 1f13234..26336bb 100644
--- a/src/authm_mad/remotes/quota/quota.rb
+++ b/src/authm_mad/remotes/quota/quota.rb
@@ -241,10 +241,10 @@ class Quota
resources.each{ |res|
pool = get_pool(res, user_id)
base_xpath = "/#{res}_POOL/#{resource}"
+ usage[key] ||= 0
Quota.const_get("#{res}_USAGE".to_sym).each { |key, params|
pool.each_xpath("#{base_xpath}/#{params[:xpath]}") { |elem|
if elem
- usage[key] ||= 0
if params[:count]
usage[key] += 1
else
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment