From 6e7b3074235bdb86938ef4f3e5ca3107d4613899 Mon Sep 17 00:00:00 2001 From: Oliver Date: Thu, 28 Apr 2022 09:51:51 +1000 Subject: [PATCH] Prevent "null" from being displayed as part units --- InvenTree/templates/js/translated/part.js | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/InvenTree/templates/js/translated/part.js b/InvenTree/templates/js/translated/part.js index d552bcb9d7..57f76dcae4 100644 --- a/InvenTree/templates/js/translated/part.js +++ b/InvenTree/templates/js/translated/part.js @@ -500,6 +500,11 @@ function duplicateBom(part_id, options={}) { */ function partStockLabel(part, options={}) { + // Prevent literal string 'null' from being displayed + if (part.units == null) { + part.units = ''; + } + if (part.in_stock) { // There IS stock available for this part