From 38fa89d1da7e7f483f582dc58409be430a80ff60 Mon Sep 17 00:00:00 2001 From: Oliver Walters Date: Thu, 25 Apr 2019 22:34:30 +1000 Subject: [PATCH] Bug fix for javascript - If location not set for StockItem, display special text --- InvenTree/static/script/inventree/stock.js | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/InvenTree/static/script/inventree/stock.js b/InvenTree/static/script/inventree/stock.js index 91aec8c6d1..a858dca122 100644 --- a/InvenTree/static/script/inventree/stock.js +++ b/InvenTree/static/script/inventree/stock.js @@ -65,7 +65,12 @@ function updateStock(items, options={}) { html += ''; html += '' + item.part.name + ''; - html += '' + item.location.name + ''; + + if (item.location) { + html += '' + item.location.name + ''; + } else { + html += 'No location set'; + } html += "