mirror of
https://github.com/inventree/InvenTree
synced 2024-08-30 18:33:04 +00:00
Fix on_delete for PurchaseOrderLineItem.destination
- Currently set to DO_NOTHING - However when deleting a StockLocation which has a PurchaseOrderLineItem.destionation point to it, this will cause an IntegrityError
This commit is contained in:
parent
c90f9b0447
commit
43c4e936a7
@ -778,7 +778,7 @@ class PurchaseOrderLineItem(OrderLineItem):
|
|||||||
)
|
)
|
||||||
|
|
||||||
destination = TreeForeignKey(
|
destination = TreeForeignKey(
|
||||||
'stock.StockLocation', on_delete=models.DO_NOTHING,
|
'stock.StockLocation', on_delete=models.SET_NULL,
|
||||||
verbose_name=_('Destination'),
|
verbose_name=_('Destination'),
|
||||||
related_name='po_lines',
|
related_name='po_lines',
|
||||||
blank=True, null=True,
|
blank=True, null=True,
|
||||||
|
Loading…
Reference in New Issue
Block a user