[buildinfo.debian.net] 08/35: Whilst every request was in a transaction, as we were explicitly catching InvalidSubmission, we weren't rolling back as expected.

Chris Lamb chris at chris-lamb.co.uk
Thu Nov 3 19:02:24 UTC 2016


This is an automated email from the git hooks/post-receive script.

lamby pushed a commit to branch master
in repository buildinfo.debian.net.

commit f9c7f2f0f67e630e5afbf822edeaae85fd585606
Author: Chris Lamb <lamby at debian.org>
Date:   Sun Oct 23 09:40:34 2016 +0200

    Whilst every request was in a transaction, as we were explicitly catching InvalidSubmission, we weren't rolling back as expected.
---
 bidb/api/utils.py | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/bidb/api/utils.py b/bidb/api/utils.py
index 7894116..1160af6 100644
--- a/bidb/api/utils.py
+++ b/bidb/api/utils.py
@@ -3,7 +3,7 @@ import hashlib
 
 from debian import deb822
 
-from django.db import IntegrityError
+from django.db import IntegrityError, transaction
 
 from bidb.packages.models import Source, Architecture, Binary
 from bidb.buildinfo.models import Buildinfo
@@ -19,6 +19,7 @@ re_installed_build_depends = re.compile(
 class InvalidSubmission(Exception):
     pass
 
+ at transaction.atomic
 def parse_submission(request):
     raw_text = request.read()
 

-- 
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/reproducible/buildinfo.debian.net.git



More information about the Reproducible-commits mailing list