Revision a3e3917f snf-astakos-app/astakos/api/quotas.py
b/snf-astakos-app/astakos/api/quotas.py | ||
---|---|---|
34 | 34 |
from django.utils import simplejson as json |
35 | 35 |
from django.views.decorators.csrf import csrf_exempt |
36 | 36 |
from django.http import HttpResponse |
37 |
|
|
38 |
from snf_django.lib.db.transaction import commit_on_success_strict |
|
37 |
from django.db import transaction |
|
39 | 38 |
|
40 | 39 |
from snf_django.lib import api |
41 | 40 |
from snf_django.lib.api.faults import BadRequest, ItemNotFound |
... | ... | |
175 | 174 |
return json_response(data, status_code=status_code) |
176 | 175 |
|
177 | 176 |
|
178 |
@commit_on_success_strict()
|
|
177 |
@transaction.commit_on_success
|
|
179 | 178 |
def _issue_commission(clientkey, provisions, name, force, accept): |
180 | 179 |
serial = qh.issue_commission(clientkey=clientkey, |
181 | 180 |
provisions=provisions, |
... | ... | |
204 | 203 |
@csrf_exempt |
205 | 204 |
@api.api_method(http_method='POST', token_required=True, user_required=False) |
206 | 205 |
@component_from_token |
207 |
@commit_on_success_strict()
|
|
206 |
@transaction.commit_on_success
|
|
208 | 207 |
def resolve_pending_commissions(request): |
209 | 208 |
data = request.body |
210 | 209 |
try: |
... | ... | |
260 | 259 |
@csrf_exempt |
261 | 260 |
@api.api_method(http_method='POST', token_required=True, user_required=False) |
262 | 261 |
@component_from_token |
263 |
@commit_on_success_strict()
|
|
262 |
@transaction.commit_on_success
|
|
264 | 263 |
def serial_action(request, serial): |
265 | 264 |
data = request.body |
266 | 265 |
try: |
Also available in: Unified diff