Revision a3e3917f snf-astakos-app/astakos/im/management/commands/component-remove.py
b/snf-astakos-app/astakos/im/management/commands/component-remove.py | ||
---|---|---|
32 | 32 |
# or implied, of GRNET S.A. |
33 | 33 |
|
34 | 34 |
from django.core.management.base import BaseCommand, CommandError |
35 |
from django.db import transaction |
|
35 | 36 |
from astakos.im.models import Component |
36 |
from snf_django.lib.db.transaction import commit_on_success_strict |
|
37 | 37 |
|
38 | 38 |
|
39 | 39 |
class Command(BaseCommand): |
40 | 40 |
args = "<component ID or name>" |
41 | 41 |
help = "Remove a component along with its registered services" |
42 | 42 |
|
43 |
@commit_on_success_strict()
|
|
43 |
@transaction.commit_on_success
|
|
44 | 44 |
def handle(self, *args, **options): |
45 | 45 |
if len(args) != 1: |
46 | 46 |
raise CommandError("Please provide a component ID or name") |
Also available in: Unified diff