2
0
mirror of https://github.com/inventree/InvenTree.git synced 2026-03-21 11:44:42 +00:00

Remove error handling for complete_build_allocations task (#11551)

- We *want* this to fail, and run again
- It is handled by the background task manager
This commit is contained in:
Oliver
2026-03-18 07:07:25 +11:00
committed by GitHub
parent 756c0be0b5
commit b10fd949d3

View File

@@ -83,7 +83,7 @@ def complete_build_allocations(build_id: int, user_id: int):
"""Complete build allocations for a specified BuildOrder."""
from build.models import Build
build_order = Build.objects.filter(pk=build_id).first()
build_order = Build.objects.get(pk=build_id)
if user_id:
try:
@@ -97,13 +97,6 @@ def complete_build_allocations(build_id: int, user_id: int):
else:
user = None
if not build_order:
logger.warning(
'Could not complete build allocations for BuildOrder <%s> - BuildOrder does not exist',
build_id,
)
return
build_order.complete_allocations(user)