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']
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'])
# 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)
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)
}, 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)
}, 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:
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)
}, 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)
@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)
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)
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)
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:
from util import generate_random_token
@login_required
-@transaction.commit_on_success
+@transaction.atomic
def userprofile(request):
(profile, created) = UserProfile.objects.get_or_create(user=request.user)
form = mailform = None
}, context_instance=RequestContext(request))
@login_required
-@transaction.commit_on_success
+@transaction.atomic
def deletemail(request):
try:
id = int(request.META['QUERY_STRING'])
return HttpResponseRedirect('../')
@login_required
-@transaction.commit_on_success
+@transaction.atomic
def confirmemail(request, tokenhash):
try:
e = UserExtraEmail.objects.get(user=request.user, token=tokenhash)