mirror of
https://github.com/inventree/InvenTree.git
synced 2025-05-12 10:12:58 +00:00
Prevent check for low stock when creating new items (#6055)
This commit is contained in:
parent
048a06ce19
commit
63a0d4d223
@ -2136,7 +2136,7 @@ def after_save_stock_item(sender, instance: StockItem, created, **kwargs):
|
|||||||
"""Hook function to be executed after StockItem object is saved/updated."""
|
"""Hook function to be executed after StockItem object is saved/updated."""
|
||||||
from part import tasks as part_tasks
|
from part import tasks as part_tasks
|
||||||
|
|
||||||
if not InvenTree.ready.isImportingData():
|
if created and not InvenTree.ready.isImportingData():
|
||||||
# Run this check in the background
|
# Run this check in the background
|
||||||
InvenTree.tasks.offload_task(part_tasks.notify_low_stock_if_required, instance.part)
|
InvenTree.tasks.offload_task(part_tasks.notify_low_stock_if_required, instance.part)
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user