From: miker Date: Mon, 21 Feb 2011 18:30:19 +0000 (+0000) Subject: Make sure we continue looping in situations where there is only one copy X-Git-Url: https://old-git.evergreen-ils.org/?a=commitdiff_plain;h=8855b6ea7c98d2b45835beae7ce1fe51aabec394;p=working%2FEvergreen.git Make sure we continue looping in situations where there is only one copy git-svn-id: svn://svn.open-ils.org/ILS/branches/rel_2_0@19497 dcc99617-32d9-48b4-a31d-7c20da2025e4 --- diff --git a/Open-ILS/src/perlmods/OpenILS/Application/Storage/Publisher/action.pm b/Open-ILS/src/perlmods/OpenILS/Application/Storage/Publisher/action.pm index d7061f005f..a7e5931fa2 100644 --- a/Open-ILS/src/perlmods/OpenILS/Application/Storage/Publisher/action.pm +++ b/Open-ILS/src/perlmods/OpenILS/Application/Storage/Publisher/action.pm @@ -1399,7 +1399,7 @@ 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 {