From 85396d0605a1facaa00bb50f637ddf98ec8d5317 Mon Sep 17 00:00:00 2001 From: Andreas Jonsson Date: Fri, 6 Mar 2026 20:21:50 +0000 Subject: [PATCH] Bug 41959: Handle edge case --- C4/HoldsQueue.pm | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/C4/HoldsQueue.pm b/C4/HoldsQueue.pm index e0602e595eb..6f82ca46d91 100644 --- a/C4/HoldsQueue.pm +++ b/C4/HoldsQueue.pm @@ -479,7 +479,7 @@ sub _allocateWithTransportCostMatrix { RETRY: while (1) { - return [] if $num_agents == 0 || $num_tasks == 0; + return [] if $num_agents == 0 || $num_tasks + scalar(@remaining) == 0; if ( $num_tasks < $num_agents && @remaining ) { -- 2.39.5