summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMagnus Hagander2016-01-06 15:34:50 +0000
committerMagnus Hagander2016-01-06 15:34:50 +0000
commit3b5540351321454add1dc4b13d0f75422965e5b2 (patch)
treed20d64596ea417b234cd8e34f1cfddcf4121a8fb
parent2e79697f654ed8dd930b881d40b5f1f7e64fe1b5 (diff)
Replace on_success_commit with atomic
-rw-r--r--pgcommitfest/commitfest/ajax.py8
-rw-r--r--pgcommitfest/commitfest/views.py16
-rw-r--r--pgcommitfest/userprofile/views.py6
3 files changed, 15 insertions, 15 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)
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!'
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.
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'
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
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
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
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
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
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
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
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
def send_email(request, cfid):
cf = get_object_or_404(CommitFest, pk=cfid)
if not request.user.is_staff:
diff --git a/pgcommitfest/userprofile/views.py b/pgcommitfest/userprofile/views.py
index 75e84c8..7dac00c 100644
--- a/pgcommitfest/userprofile/views.py
+++ b/pgcommitfest/userprofile/views.py
@@ -15,7 +15,7 @@ from forms import UserProfileForm, MailForm
from util import generate_random_token
@login_required
def userprofile(request):
(profile, created) = UserProfile.objects.get_or_create(user=request.user)
form = mailform = None
@@ -62,7 +62,7 @@ def userprofile(request):
}, context_instance=RequestContext(request))
@login_required
def deletemail(request):
try:
id = int(request.META['QUERY_STRING'])
@@ -81,7 +81,7 @@ def deletemail(request):
return HttpResponseRedirect('../')
@login_required
def confirmemail(request, tokenhash):
try:
e = UserExtraEmail.objects.get(user=request.user, token=tokenhash)