Commit 44dfc5ae authored by Giorgos Korfiatis's avatar Giorgos Korfiatis
Browse files

Set default quota values in _increase_resource

parent 3b75094d
......@@ -33,6 +33,7 @@
from synnefo.lib.quotaholder.api import (
QuotaholderAPI,
QH_PRACTICALLY_INFINITE,
InvalidKeyError, NoEntityError,
NoQuantityError, NoCapacityError,
ExportLimitError, ImportLimitError,
......@@ -363,7 +364,10 @@ class QuotaholderDjangoDBCallpoint(Callpoint):
except Holding.DoesNotExist:
h = Holding(entity=entity, resource=resource)
p = Policy.objects.create(policy=self._new_policy_name(),
quantity=0)
quantity=0,
capacity=QH_PRACTICALLY_INFINITE,
import_limit=QH_PRACTICALLY_INFINITE,
export_limit=QH_PRACTICALLY_INFINITE)
h.policy = p
h.imported += amount
h.save()
......
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