Ensure stock check task runs in the background worker (#10266)

This commit is contained in:
Oliver 2025-09-04 14:39:11 +10:00 committed by GitHub
parent c6f46c587d
commit a3f4cc9b88
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
1 changed files with 3 additions and 1 deletions

View File

@ -767,7 +767,9 @@ class Build(
from build.tasks import check_build_stock
# Run checks on required parts
InvenTree.tasks.offload_task(check_build_stock, self, group='build')
InvenTree.tasks.offload_task(
check_build_stock, self, group='build', force_async=True
)
@transaction.atomic
def hold_build(self):