From 5a69b62cba929f22d3397b9972dfd0a30dc94fe2 Mon Sep 17 00:00:00 2001 From: "James E. Blair" Date: Mon, 7 Apr 2025 15:16:03 -0700 Subject: [PATCH] Fix job display in web ui If a job variant has no branch matchers, we now return null rather than the empty list. This is more correct since it better reflicts Zuul's internal state, so let's keep this behavior, but adjust the web ui to expect a null value. Change-Id: I0ba109a65b39e06433223351a0040642e415368d --- web/src/containers/job/Job.jsx | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/web/src/containers/job/Job.jsx b/web/src/containers/job/Job.jsx index c12449dba5..602a51e457 100644 --- a/web/src/containers/job/Job.jsx +++ b/web/src/containers/job/Job.jsx @@ -40,7 +40,7 @@ class Job extends React.Component { for one branch we don't get the branches. This might be a bug. In this case, use the source context branch (i.e. where it's defined */ - if (variant.branches.length === 0) { + if (variant.branches === null || variant.branches.length === 0) { title = variant.source_context.branch } else { variant.branches.forEach((item) => {