From b10fd949d38c98700ce447b3983fcb11d44c5cb6 Mon Sep 17 00:00:00 2001 From: Oliver Date: Wed, 18 Mar 2026 07:07:25 +1100 Subject: [PATCH] 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 --- src/backend/InvenTree/build/tasks.py | 9 +-------- 1 file changed, 1 insertion(+), 8 deletions(-) diff --git a/src/backend/InvenTree/build/tasks.py b/src/backend/InvenTree/build/tasks.py index b785ff266f..363dac3e19 100644 --- a/src/backend/InvenTree/build/tasks.py +++ b/src/backend/InvenTree/build/tasks.py @@ -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)