diff --git a/buildbot_nix/buildbot_nix/build_canceller.py b/buildbot_nix/buildbot_nix/build_canceller.py index d020ce9fd..79c7e008a 100644 --- a/buildbot_nix/buildbot_nix/build_canceller.py +++ b/buildbot_nix/buildbot_nix/build_canceller.py @@ -10,7 +10,7 @@ def branch_key_for_pr(build: dict[str, Any]) -> str: """Extract a unique key for PR/change to cancel old builds.""" - branch = build.get("branch", "") + branch = build.get("branch") or "" # For GitHub/Gitea/GitLab PRs if branch.startswith(("refs/pull/", "refs/merge-requests/")):