From c6de5c4e98c5f5a01b7f72050db616c905d8efc2 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Nikola=20Forr=C3=B3?= Date: Mon, 3 Jun 2024 09:10:52 +0200 Subject: [PATCH] Do not ignore dist-git PRs with ID 0 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit While it seems dist-git PR IDs for a project always start with 1 the condition is technically wrong and in case there was a PR with ID 0 it would be silently ignored. Signed-off-by: Nikola Forró --- packit_service/worker/mixin.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/packit_service/worker/mixin.py b/packit_service/worker/mixin.py index e9f695f18..eed7e9718 100644 --- a/packit_service/worker/mixin.py +++ b/packit_service/worker/mixin.py @@ -250,7 +250,7 @@ class GetPagurePullRequestMixin(GetPagurePullRequest): @property def pull_request(self): if not self._pull_request: - if self.data.pr_id: + if self.data.pr_id is not None: logger.debug( f"Getting pull request #{self.data.pr_id}" f"for repo {self.project.namespace}/{self.project.repo}"