Fix internal server error when serializing stock with no location
This commit is contained in:
parent
2a4b9c6c5c
commit
9149aa1536
|
|
@ -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…
Reference in New Issue