-
-
Save dmamolina/9218f1b5b5fc19bc58ec to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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