Commit c03a9467 authored by Giorgos Korfiatis's avatar Giorgos Korfiatis
Browse files

quotaholder: Reuse holding IDs in set_quota

For efficiency reasons, commit 20c6de3 deletes and recreates holdings
instead of updating them one by one. In order not to exhaust the IDs, we
reuse the deleted ones.
parent fb1c7bf2
......@@ -124,6 +124,7 @@ def set_quota(quotas, resource=None):
h_old = holdings[key]
h.usage_min = h_old.usage_min
h.usage_max = h_old.usage_max
h.id = h_old.id
except KeyError:
pass
new_holdings[key] = h
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment