2
0
mirror of https://github.com/inventree/InvenTree.git synced 2025-06-15 11:35:41 +00:00

fix trigger on none

This commit is contained in:
Matthias Mair
2024-07-11 22:49:15 +02:00
parent 62c57e9447
commit dfd53d296a

View File

@ -1107,7 +1107,11 @@ class StockItem(
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 item