Revision a3e3917f snf-astakos-app/astakos/im/management/commands/resource-import.py
b/snf-astakos-app/astakos/im/management/commands/resource-import.py | ||
---|---|---|
33 | 33 |
|
34 | 34 |
from optparse import make_option |
35 | 35 |
|
36 |
from django.db import transaction |
|
36 | 37 |
from django.core.management.base import BaseCommand, CommandError |
37 | 38 |
from django.utils import simplejson as json |
38 | 39 |
|
39 |
from snf_django.lib.db.transaction import commit_on_success_strict |
|
40 | 40 |
from astakos.im.register import add_resource, RegisterException |
41 | 41 |
from ._common import read_from_file |
42 | 42 |
|
... | ... | |
69 | 69 |
raise CommandError(m) |
70 | 70 |
self.add_resources(data) |
71 | 71 |
|
72 |
@commit_on_success_strict()
|
|
72 |
@transaction.commit_on_success
|
|
73 | 73 |
def add_resources(self, resources): |
74 | 74 |
output = [] |
75 | 75 |
for resource in resources: |
Also available in: Unified diff