mirror of
https://github.com/inventree/InvenTree.git
synced 2025-06-11 17:45:39 +00:00
Fix internal server error when serializing stock with no location
This commit is contained in:
@ -1120,6 +1120,7 @@ class StockItemSerialize(AjaxUpdateView):
|
|||||||
|
|
||||||
initials['quantity'] = item.quantity
|
initials['quantity'] = item.quantity
|
||||||
initials['serial_numbers'] = item.part.getSerialNumberString(item.quantity)
|
initials['serial_numbers'] = item.part.getSerialNumberString(item.quantity)
|
||||||
|
if item.location is not None:
|
||||||
initials['destination'] = item.location.pk
|
initials['destination'] = item.location.pk
|
||||||
|
|
||||||
return initials
|
return initials
|
||||||
|
Reference in New Issue
Block a user