diff --git a/InvenTree/stock/templates/stock/item_base.html b/InvenTree/stock/templates/stock/item_base.html
index 9b0b182848..ce055d65c5 100644
--- a/InvenTree/stock/templates/stock/item_base.html
+++ b/InvenTree/stock/templates/stock/item_base.html
@@ -161,7 +161,7 @@ InvenTree | {% trans "Stock Item" %} - {{ item }}
|
{% trans "Customer" %} |
- {{ item.customer.name }} |
+ {{ item.customer.name }} |
{% endif %}
{% if item.belongs_to %}
diff --git a/InvenTree/templates/status_codes.html b/InvenTree/templates/status_codes.html
index 029252a842..f032f97309 100644
--- a/InvenTree/templates/status_codes.html
+++ b/InvenTree/templates/status_codes.html
@@ -18,14 +18,18 @@ function {{ label }}StatusDisplay(key) {
key = String(key);
- var value = {{ label }}Codes[key].value;
+ var value = null;
+ var label = null;
+
+ if (key in {{ label }}Codes) {
+ value = {{ label }}Codes[key].value;
+ label = {{ label }}Codes[key].label;
+ }
if (value == null || value.length == 0) {
value = key;
+ label = '';
}
- // Select the label color
- var label = {{ label }}Codes[key].label ?? '';
-
return `${value}`;
}