From: miker Date: Wed, 26 Jul 2006 17:04:01 +0000 (+0000) Subject: break the loop if there are no capturable copies at this proximity X-Git-Url: https://old-git.evergreen-ils.org/?a=commitdiff_plain;h=d40b6d76edcdcd6af50a6ff643140718ac3d9655;p=Evergreen.git break the loop if there are no capturable copies at this proximity git-svn-id: svn://svn.open-ils.org/ILS/trunk@5111 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 6abf846ad7..33dd5cde94 100644 --- a/Open-ILS/src/perlmods/OpenILS/Application/Storage/Publisher/action.pm +++ b/Open-ILS/src/perlmods/OpenILS/Application/Storage/Publisher/action.pm @@ -1053,6 +1053,7 @@ sub choose_nearest_copy { request_lib => $hold->request_lib->to_fieldmapper, } )) { + last unless(@capturable); $rand = int(rand(scalar(@capturable))); next; }