mirror of
https://github.com/inventree/InvenTree.git
synced 2026-10-06 10:21:18 +00:00
Fix internal server error when serializing stock with no location
This commit is contained in:
1 parent
2a4b9c6c5c
commit
9149aa1536
1 file changed
+2
-1
@@ -1120,7 +1120,8 @@ class StockItemSerialize(AjaxUpdateView):
|
||||
|
||||
initials['quantity'] = item.quantity
|
||||
initials['serial_numbers'] = item.part.getSerialNumberString(item.quantity)
|
||||
initials['destination'] = item.location.pk
|
||||
if item.location is not None:
|
||||
initials['destination'] = item.location.pk
|
||||
|
||||
return initials
|
||||
|
||||
|
||||
Reference in new issue
Block a user