From 68ec5df37115425df3a3a4a6cbec426593c7e5f4 Mon Sep 17 00:00:00 2001 From: Oliver Walters Date: Fri, 12 Apr 2019 23:03:02 +1000 Subject: [PATCH] Correctly handle StockTrackingItem if there is no user data --- InvenTree/stock/templates/stock/item.html | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/InvenTree/stock/templates/stock/item.html b/InvenTree/stock/templates/stock/item.html index 29c2d78e88..a53feec8c3 100644 --- a/InvenTree/stock/templates/stock/item.html +++ b/InvenTree/stock/templates/stock/item.html @@ -220,7 +220,14 @@ field: 'user', title: 'User', formatter: function(value, row, index, field) { - return value.username; + if (value) + { + return value.username; + } + else + { + return "No user information"; + } } } ],