From 0782d86d120c70d2a4ae76dece88c9894d7790af Mon Sep 17 00:00:00 2001 From: "github-actions[bot]" <41898282+github-actions[bot]@users.noreply.github.com> Date: Wed, 7 Feb 2024 10:37:25 +1100 Subject: [PATCH] Fix for build.js (#6437) (#6438) - Catch potential empty build_detail attribute (cherry picked from commit df5a3013e6a33896af4aed95e8b3e3a6e6f5678b) Co-authored-by: Oliver --- InvenTree/templates/js/translated/build.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/InvenTree/templates/js/translated/build.js b/InvenTree/templates/js/translated/build.js index a95ddce5db..24b9a8b0f9 100644 --- a/InvenTree/templates/js/translated/build.js +++ b/InvenTree/templates/js/translated/build.js @@ -966,7 +966,7 @@ function loadBuildOrderAllocationTable(table, options={}) { switchable: false, title: '{% jstrans "Build Order" %}', formatter: function(value, row) { - let ref = `${row.build_detail.reference}`; + let ref = row.build_detail?.reference ?? row.build; let html = renderLink(ref, `/build/${row.build}/`); html += `- ${row.build_detail.title}`;