From 75f507d4c74d784398f8eaf229dca8ff0a542da5 Mon Sep 17 00:00:00 2001 From: "github-actions[bot]" <41898282+github-actions[bot]@users.noreply.github.com> Date: Fri, 2 Feb 2024 16:19:56 +1100 Subject: [PATCH] BuildOrder: Fix bug where test templates are requested for a non-trackable output (#6387) (#6388) (cherry picked from commit c9c93bce39e8c58921c3212b7577a9357aa3236b) Co-authored-by: Oliver --- InvenTree/templates/js/translated/build.js | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/InvenTree/templates/js/translated/build.js b/InvenTree/templates/js/translated/build.js index fce8d0ea57..a95ddce5db 100644 --- a/InvenTree/templates/js/translated/build.js +++ b/InvenTree/templates/js/translated/build.js @@ -1089,7 +1089,7 @@ function loadBuildOutputTable(build_info, options={}) { var params = options.params || {}; // test templates for the part being assembled - let test_templates = null; + let test_templates = []; // tracked line items for this build let has_tracked_lines = false; @@ -1133,6 +1133,9 @@ function loadBuildOutputTable(build_info, options={}) { test_templates.push(item); } }); + }, + error: function() { + test_templates = []; } } );