From 676adf1e43a40b0e005cf9d62b61290bb0780d65 Mon Sep 17 00:00:00 2001 From: miker Date: Mon, 21 Feb 2011 18:34:02 +0000 Subject: [PATCH] Make sure we continue looping in situations where there is only one copy git-svn-id: svn://svn.open-ils.org/ILS/trunk@19499 dcc99617-32d9-48b4-a31d-7c20da2025e4 --- .../src/perlmods/lib/OpenILS/Application/Storage/Publisher/action.pm | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/Open-ILS/src/perlmods/lib/OpenILS/Application/Storage/Publisher/action.pm b/Open-ILS/src/perlmods/lib/OpenILS/Application/Storage/Publisher/action.pm index 6295a62782..cc9801e1f6 100644 --- a/Open-ILS/src/perlmods/lib/OpenILS/Application/Storage/Publisher/action.pm +++ b/Open-ILS/src/perlmods/lib/OpenILS/Application/Storage/Publisher/action.pm @@ -1411,7 +1411,8 @@ sub new_hold_copy_targeter { # We haven't exceeded max_loops yet my @keeper_copies; for my $cp ( @$all_copies ) { - push(@keeper_copies, $cp) if ( grep { $_ eq ''.$cp->circ_lib } @keepers ); + push(@keeper_copies, $cp) if ( !@keepers || grep { $_ eq ''.$cp->circ_lib } @keepers ); + } $all_copies = [@keeper_copies]; } else { -- 2.11.0