mirror of
https://github.com/inventree/InvenTree
synced 2024-08-30 18:33:04 +00:00
make imports on function level
This commit is contained in:
parent
18a263ff75
commit
cce3d3a35d
@ -39,7 +39,6 @@ from plugin.events import trigger_event
|
||||
from part import models as PartModels
|
||||
from stock import models as StockModels
|
||||
from users import models as UserModels
|
||||
from . import tasks as build_tasks
|
||||
|
||||
|
||||
def get_next_build_number():
|
||||
@ -1140,6 +1139,7 @@ def after_save_build(sender, instance: Build, created: bool, **kwargs):
|
||||
"""
|
||||
Callback function to be executed after a Build instance is saved
|
||||
"""
|
||||
from . import tasks as build_tasks
|
||||
|
||||
if created:
|
||||
# A new Build has just been created
|
||||
|
@ -46,7 +46,6 @@ from users.models import Owner
|
||||
|
||||
from company import models as CompanyModels
|
||||
from part import models as PartModels
|
||||
from part import tasks as part_tasks
|
||||
|
||||
|
||||
class StockLocation(MetadataMixin, InvenTreeTree):
|
||||
@ -2021,6 +2020,7 @@ def after_delete_stock_item(sender, instance: StockItem, **kwargs):
|
||||
"""
|
||||
Function to be executed after a StockItem object is deleted
|
||||
"""
|
||||
from part import tasks as part_tasks
|
||||
|
||||
if not InvenTree.ready.isImportingData():
|
||||
# Run this check in the background
|
||||
@ -2032,6 +2032,7 @@ def after_save_stock_item(sender, instance: StockItem, created, **kwargs):
|
||||
"""
|
||||
Hook function to be executed after StockItem object is saved/updated
|
||||
"""
|
||||
from part import tasks as part_tasks
|
||||
|
||||
if not InvenTree.ready.isImportingData():
|
||||
# Run this check in the background
|
||||
|
Loading…
Reference in New Issue
Block a user