mirror of
https://github.com/inventree/InvenTree
synced 2024-08-30 18:33:04 +00:00
Handle case where deltas is null (#7516)
This commit is contained in:
parent
e920165901
commit
6cd0727714
@ -1438,7 +1438,7 @@ class StockTrackingList(ListAPI):
|
||||
|
||||
# Run a first pass through the data to determine which related models we need to lookup
|
||||
for item in data:
|
||||
deltas = item['deltas']
|
||||
deltas = item['deltas'] or {}
|
||||
|
||||
for key in delta_models.keys():
|
||||
if key in deltas:
|
||||
@ -1455,7 +1455,7 @@ class StockTrackingList(ListAPI):
|
||||
|
||||
# Now, update the data with the serialized data
|
||||
for item in data:
|
||||
deltas = item['deltas']
|
||||
deltas = item['deltas'] or {}
|
||||
|
||||
if key in deltas:
|
||||
item['deltas'][f'{key}_detail'] = related_data.get(
|
||||
|
Loading…
Reference in New Issue
Block a user