diff --git a/InvenTree/stock/api.py b/InvenTree/stock/api.py index 376d04f643..3fc440cae4 100644 --- a/InvenTree/stock/api.py +++ b/InvenTree/stock/api.py @@ -1018,6 +1018,9 @@ class StockTrackingList(generics.ListAPIView): for item in data: deltas = item['deltas'] + if not deltas: + deltas = {} + # Add location detail if 'location' in deltas: try: diff --git a/InvenTree/templates/js/stock.js b/InvenTree/templates/js/stock.js index 8f06d403ee..b89cceea83 100644 --- a/InvenTree/templates/js/stock.js +++ b/InvenTree/templates/js/stock.js @@ -1017,6 +1017,11 @@ function loadStockTrackingTable(table, options) { formatter: function(details, row, index, field) { var html = ``; + if (!details) { + html += '
'; + return html; + } + // Location information if (details.location) {