From: Michael Tremer Date: Fri, 27 Oct 2017 15:56:30 +0000 (+0100) Subject: builds: Move upvoting for testers to where it should be X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=2093d6910f78c1d7bb397ab959ae3a580d9aade5;p=pbs.git builds: Move upvoting for testers to where it should be Signed-off-by: Michael Tremer --- diff --git a/src/buildservice/builds.py b/src/buildservice/builds.py index 2d29beae..704579fa 100644 --- a/src/buildservice/builds.py +++ b/src/buildservice/builds.py @@ -242,6 +242,10 @@ class Builds(base.Object): for bug in commit.fixed_bugs: build.add_bug(bug) + # Upvote the build for the testers + for tester in commit.testers: + build.upvote(tester) + # Create all automatic jobs build.create_autojobs(arches=arches) diff --git a/src/buildservice/sources.py b/src/buildservice/sources.py index 50430c56..2d4e2bbb 100644 --- a/src/buildservice/sources.py +++ b/src/buildservice/sources.py @@ -133,13 +133,9 @@ class Sources(base.Object): # Import all packages in one swoop. for pkg in pkgs: with self.db.transaction(): - build = self.backend.builds.create_from_source_package(pkg, + self.backend.builds.create_from_source_package(pkg, source.distro, commit=commit, type="release") - # Import any testers from the commit message - for tester in commit.testers: - build.upvote(tester) - except: if commit: commit.state = "failed"