summaryrefslogtreecommitdiff
path: root/pgcommitfest/commitfest
diff options
context:
space:
mode:
Diffstat (limited to 'pgcommitfest/commitfest')
-rw-r--r--pgcommitfest/commitfest/ajax.py8
-rw-r--r--pgcommitfest/commitfest/views.py16
2 files changed, 12 insertions, 12 deletions
diff --git a/pgcommitfest/commitfest/ajax.py b/pgcommitfest/commitfest/ajax.py
index 1adf0d0..96ae7b0 100644
--- a/pgcommitfest/commitfest/ajax.py
+++ b/pgcommitfest/commitfest/ajax.py
@@ -73,7 +73,7 @@ def getMessages(request):
r = _archivesAPI('/message-id.json/%s' % thread.messageid)
return sorted(r, key=lambda x: x['date'], reverse=True)
-@transaction.commit_on_success
+@transaction.atomic
def annotateMessage(request):
thread = get_object_or_404(MailThread, pk=int(request.POST['t']))
msgid = request.POST['msgid']
@@ -102,7 +102,7 @@ def annotateMessage(request):
return 'OK'
return 'Message not found in thread!'
-@transaction.commit_on_success
+@transaction.atomic
def deleteAnnotation(request):
annotation = get_object_or_404(MailThreadAnnotation, pk=request.POST['id'])
@@ -132,7 +132,7 @@ def parse_and_add_attachments(threadinfo, mailthread):
# In theory we should remove objects if they don't have an
# attachment, but how could that ever happen? Ignore for now.
-@transaction.commit_on_success
+@transaction.atomic
def attachThread(request):
cf = get_object_or_404(CommitFest, pk=int(request.POST['cf']))
patch = get_object_or_404(Patch, pk=int(request.POST['p']), commitfests=cf)
@@ -185,7 +185,7 @@ def doAttachThread(cf, patch, msgid, user):
return 'OK'
-@transaction.commit_on_success
+@transaction.atomic
def detachThread(request):
cf = get_object_or_404(CommitFest, pk=int(request.POST['cf']))
patch = get_object_or_404(Patch, pk=int(request.POST['p']), commitfests=cf)
diff --git a/pgcommitfest/commitfest/views.py b/pgcommitfest/commitfest/views.py
index f2e54d2..b4f19b2 100644
--- a/pgcommitfest/commitfest/views.py
+++ b/pgcommitfest/commitfest/views.py
@@ -228,7 +228,7 @@ def patch(request, cfid, patchid):
}, context_instance=RequestContext(request))
@login_required
-@transaction.commit_on_success
+@transaction.atomic
def patchform(request, cfid, patchid):
cf = get_object_or_404(CommitFest, pk=cfid)
patch = get_object_or_404(Patch, pk=patchid, commitfests=cf)
@@ -262,7 +262,7 @@ def patchform(request, cfid, patchid):
}, context_instance=RequestContext(request))
@login_required
-@transaction.commit_on_success
+@transaction.atomic
def newpatch(request, cfid):
cf = get_object_or_404(CommitFest, pk=cfid)
if not cf.status == CommitFest.STATUS_OPEN and not request.user.is_staff:
@@ -312,7 +312,7 @@ def _review_status_string(reviewstatus):
return "not tested"
@login_required
-@transaction.commit_on_success
+@transaction.atomic
def comment(request, cfid, patchid, what):
cf = get_object_or_404(CommitFest, pk=cfid)
patch = get_object_or_404(Patch, pk=patchid)
@@ -396,7 +396,7 @@ def comment(request, cfid, patchid, what):
}, context_instance=RequestContext(request))
@login_required
-@transaction.commit_on_success
+@transaction.atomic
def status(request, cfid, patchid, status):
poc = get_object_or_404(PatchOnCommitFest.objects.select_related(), commitfest__id=cfid, patch__id=patchid)
@@ -431,7 +431,7 @@ def status(request, cfid, patchid, status):
@login_required
-@transaction.commit_on_success
+@transaction.atomic
def close(request, cfid, patchid, status):
poc = get_object_or_404(PatchOnCommitFest.objects.select_related(), commitfest__id=cfid, patch__id=patchid)
@@ -504,7 +504,7 @@ def close(request, cfid, patchid, status):
return HttpResponseRedirect('/%s/%s/' % (poc.commitfest.id, poc.patch.id))
@login_required
-@transaction.commit_on_success
+@transaction.atomic
def reviewer(request, cfid, patchid, status):
get_object_or_404(CommitFest, pk=cfid)
patch = get_object_or_404(Patch, pk=patchid)
@@ -522,7 +522,7 @@ def reviewer(request, cfid, patchid, status):
return HttpResponseRedirect('../../')
@login_required
-@transaction.commit_on_success
+@transaction.atomic
def committer(request, cfid, patchid, status):
get_object_or_404(CommitFest, pk=cfid)
patch = get_object_or_404(Patch, pk=patchid)
@@ -546,7 +546,7 @@ def committer(request, cfid, patchid, status):
return HttpResponseRedirect('../../')
@login_required
-@transaction.commit_on_success
+@transaction.atomic
def send_email(request, cfid):
cf = get_object_or_404(CommitFest, pk=cfid)
if not request.user.is_staff: