Revision a3e3917f snf-astakos-app/astakos/im/views/projects.py

b/snf-astakos-app/astakos/im/views/projects.py
48 48
from django.views.generic.list_detail import object_list, object_detail
49 49
from django.core.exceptions import PermissionDenied
50 50
from django.views.decorators.http import require_http_methods
51

  
52
from snf_django.lib.db.transaction import commit_on_success_strict
51
from django.db import transaction
53 52

  
54 53
import astakos.im.messages as astakos_messages
55 54

  
......
123 122
    return redirect(next)
124 123

  
125 124

  
126
@commit_on_success_strict()
125
@transaction.commit_on_success
127 126
def create_app_object(request, extra_context=None):
128 127
    try:
129 128
        summary = 'im/projects/projectapplication_form_summary.html'
......
191 190
    return redirect(next)
192 191

  
193 192

  
194
@commit_on_success_strict()
193
@transaction.commit_on_success
195 194
def _project_app_cancel(request, application_id):
196 195
    chain_id = None
197 196
    try:
......
264 263
    return redirect(next)
265 264

  
266 265

  
267
@commit_on_success_strict()
266
@transaction.commit_on_success
268 267
def update_app_object(request, object_id, extra_context=None):
269 268
    try:
270 269
        summary = 'im/projects/projectapplication_form_summary.html'
......
296 295
    return common_detail(request, chain_id)
297 296

  
298 297

  
299
@commit_on_success_strict()
298
@transaction.commit_on_success
300 299
def addmembers(request, chain_id, addmembers_form):
301 300
    if addmembers_form.is_valid():
302 301
        try:
......
476 475
    return redirect(next)
477 476

  
478 477

  
479
@commit_on_success_strict()
478
@transaction.commit_on_success
480 479
def _project_join(request, chain_id):
481 480
    try:
482 481
        chain_id = int(chain_id)
......
505 504
    return redirect(next)
506 505

  
507 506

  
508
@commit_on_success_strict()
507
@transaction.commit_on_success
509 508
def _project_leave(request, memb_id):
510 509
    try:
511 510
        memb_id = int(memb_id)
......
534 533
    return redirect(next)
535 534

  
536 535

  
537
@commit_on_success_strict()
536
@transaction.commit_on_success
538 537
def _project_cancel_member(request, memb_id):
539 538
    try:
540 539
        cancel_membership(memb_id, request.user)
......
555 554
    return redirect_back(request, 'project_list')
556 555

  
557 556

  
558
@commit_on_success_strict()
557
@transaction.commit_on_success
559 558
def _project_accept_member(request, memb_id):
560 559
    try:
561 560
        memb_id = int(memb_id)
......
580 579
    return redirect_back(request, 'project_list')
581 580

  
582 581

  
583
@commit_on_success_strict()
582
@transaction.commit_on_success
584 583
def _project_remove_member(request, memb_id):
585 584
    try:
586 585
        memb_id = int(memb_id)
......
604 603
    return redirect_back(request, 'project_list')
605 604

  
606 605

  
607
@commit_on_success_strict()
606
@transaction.commit_on_success
608 607
def _project_reject_member(request, memb_id):
609 608
    try:
610 609
        memb_id = int(memb_id)
......
641 640
    return redirect(reverse('project_detail', args=(chain_id,)))
642 641

  
643 642

  
644
@commit_on_success_strict()
643
@transaction.commit_on_success
645 644
def _project_app_approve(request, application_id):
646 645
    approve_application(application_id)
647 646

  
......
671 670
    return redirect(reverse('project_list'))
672 671

  
673 672

  
674
@commit_on_success_strict()
673
@transaction.commit_on_success
675 674
def _project_app_deny(request, application_id, reason):
676 675
    deny_application(application_id, reason=reason)
677 676

  

Also available in: Unified diff