Skip to content

Commit

Permalink
Do not ignore dist-git PRs with ID 0 (#2437)
Browse files Browse the repository at this point in the history
Do not ignore dist-git PRs with ID 0

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.
Related to #2359.

Reviewed-by: Laura Barcziová
  • Loading branch information
softwarefactory-project-zuul[bot] committed Jun 3, 2024
2 parents de620e1 + c6de5c4 commit ca15dc1
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion packit_service/worker/mixin.py
Original file line number Diff line number Diff line change
Expand Up @@ -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}"
Expand Down

0 comments on commit ca15dc1

Please sign in to comment.