mirror of
https://github.com/inventree/InvenTree.git
synced 2025-05-01 13:06:45 +00:00
Merge pull request #931 from bcc/bug-serialize-no-location
Fix internal server error when serializing stock with no location
This commit is contained in:
commit
788d497e87
@ -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
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user