2
0
mirror of https://github.com/inventree/InvenTree.git synced 2025-04-28 19:46:46 +00:00

Fix for build.js (#6437) (#6438)

- Catch potential empty build_detail attribute

(cherry picked from commit df5a3013e6a33896af4aed95e8b3e3a6e6f5678b)

Co-authored-by: Oliver <oliver.henry.walters@gmail.com>
This commit is contained in:
github-actions[bot] 2024-02-07 10:37:25 +11:00 committed by GitHub
parent e5e18f3711
commit 0782d86d12
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -966,7 +966,7 @@ function loadBuildOrderAllocationTable(table, options={}) {
switchable: false, switchable: false,
title: '{% jstrans "Build Order" %}', title: '{% jstrans "Build Order" %}',
formatter: function(value, row) { 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}/`); let html = renderLink(ref, `/build/${row.build}/`);
html += `- <small>${row.build_detail.title}</small>`; html += `- <small>${row.build_detail.title}</small>`;