2
0
mirror of https://github.com/inventree/InvenTree.git synced 2025-06-17 12:35:46 +00:00

use direct import instead of text for offload

This commit is contained in:
Matthias Mair
2022-05-16 17:45:51 +02:00
parent 9ec626b650
commit 0f5c03e44c
8 changed files with 17 additions and 14 deletions

View File

@ -41,6 +41,7 @@ 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():
@ -1146,7 +1147,7 @@ def after_save_build(sender, instance: Build, created: bool, **kwargs):
# A new Build has just been created
# Run checks on required parts
InvenTree.tasks.offload_task('build.tasks.check_build_stock', instance)
InvenTree.tasks.offload_task(build_tasks.check_build_stock, instance)
class BuildOrderAttachment(InvenTreeAttachment):