Revision 44104cd3 snf-astakos-app/astakos/im/management/commands/user-set-initial-quota.py
b/snf-astakos-app/astakos/im/management/commands/user-set-initial-quota.py | ||
---|---|---|
43 | 43 |
|
44 | 44 |
from snf_django.lib.db.transaction import commit_on_success_strict |
45 | 45 |
from astakos.im.models import AstakosUser, AstakosUserQuota, Resource |
46 |
from astakos.im.functions import qh_sync
|
|
46 |
from astakos.im.quotas import qh_sync_user
|
|
47 | 47 |
|
48 | 48 |
AddResourceArgs = namedtuple('AddQuotaArgs', ('resource', |
49 | 49 |
'capacity', |
... | ... | |
168 | 168 |
user.add_resource_policy(*args) |
169 | 169 |
except Exception as e: |
170 | 170 |
raise CommandError("Failed to add policy: %s" % e) |
171 |
qh_sync([user.id])
|
|
171 |
qh_sync_user(user.id)
|
|
172 | 172 |
|
173 | 173 |
def import_from_file(self, location): |
174 | 174 |
try: |
Also available in: Unified diff