From df5a3013e6a33896af4aed95e8b3e3a6e6f5678b Mon Sep 17 00:00:00 2001 From: Oliver Date: Wed, 7 Feb 2024 10:30:08 +1100 Subject: [PATCH] Fix for build.js (#6437) - Catch potential empty build_detail attribute --- 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 d2794cb990..e8cf8ac4b7 100644 --- a/InvenTree/templates/js/translated/build.js +++ b/InvenTree/templates/js/translated/build.js @@ -971,7 +971,7 @@ function loadBuildOrderAllocationTable(table, options={}) { switchable: false, title: '{% trans "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}`;