Revision d9f634a2
b/snf-astakos-app/astakos/im/management/commands/reconcile-resources-astakos.py | ||
---|---|---|
37 | 37 |
|
38 | 38 |
from synnefo.webproject.management.utils import pprint_table |
39 | 39 |
from snf_django.lib.db.transaction import commit_on_success_strict |
40 |
from astakos.im.models import Service, AstakosUser
|
|
40 |
from astakos.im.models import Component, AstakosUser
|
|
41 | 41 |
from astakos.im.quotas import service_get_quotas, SYSTEM |
42 | 42 |
from astakos.im.functions import count_pending_app |
43 | 43 |
import astakos.quotaholder_app.callpoint as qh |
... | ... | |
74 | 74 |
userid = options['userid'] |
75 | 75 |
|
76 | 76 |
try: |
77 |
astakos = Service.objects.get(name="astakos")
|
|
78 |
except Service.DoesNotExist:
|
|
79 |
raise CommandError("Service 'astakos' not found.")
|
|
77 |
astakos = Component.objects.get(name="astakos")
|
|
78 |
except Component.DoesNotExist:
|
|
79 |
raise CommandError("Component 'astakos' not found.")
|
|
80 | 80 |
|
81 | 81 |
query = [userid] if userid is not None else None |
82 | 82 |
qh_holdings = service_get_quotas(astakos, query) |
Also available in: Unified diff