From 9c3b04f771bac0517cf5a7843721886ca98b62bc Mon Sep 17 00:00:00 2001 From: Oliver Date: Wed, 17 Nov 2021 14:09:20 +1100 Subject: [PATCH] Adds fallback value if status code color is not defined --- InvenTree/templates/status_codes.html | 3 +++ 1 file changed, 3 insertions(+) diff --git a/InvenTree/templates/status_codes.html b/InvenTree/templates/status_codes.html index fa448360b6..3b834a6e01 100644 --- a/InvenTree/templates/status_codes.html +++ b/InvenTree/templates/status_codes.html @@ -27,6 +27,9 @@ function {{ label }}StatusDisplay(key, options={}) { label = {{ label }}Codes[key].label; } + // Fallback option for label + label = label || 'bg-dark'; + if (value == null || value.length == 0) { value = key; label = '';