mirror of
https://github.com/inventree/InvenTree.git
synced 2025-06-16 03:55:41 +00:00
fix trigger on none
This commit is contained in:
@ -1107,7 +1107,11 @@ class StockItem(
|
|||||||
|
|
||||||
item.add_tracking_entry(code, user, deltas, notes=notes)
|
item.add_tracking_entry(code, user, deltas, notes=notes)
|
||||||
|
|
||||||
trigger_event('stockitem.assignedtocustomer', id=self.id, customer=customer.id)
|
trigger_event(
|
||||||
|
'stockitem.assignedtocustomer',
|
||||||
|
id=self.id,
|
||||||
|
customer=customer.id if customer else None,
|
||||||
|
)
|
||||||
|
|
||||||
# Return the reference to the stock item
|
# Return the reference to the stock item
|
||||||
return item
|
return item
|
||||||
|
Reference in New Issue
Block a user