making old_best tests more explicit
authormiker <miker@dcc99617-32d9-48b4-a31d-7c20da2025e4>
Thu, 13 Mar 2008 16:38:43 +0000 (16:38 +0000)
committermiker <miker@dcc99617-32d9-48b4-a31d-7c20da2025e4>
Thu, 13 Mar 2008 16:38:43 +0000 (16:38 +0000)
git-svn-id: svn://svn.open-ils.org/ILS/trunk@9002 dcc99617-32d9-48b4-a31d-7c20da2025e4

Open-ILS/src/perlmods/OpenILS/Application/Storage/Publisher/action.pm

index 699b2eb..cb6b06a 100644 (file)
@@ -951,11 +951,7 @@ sub new_hold_copy_targeter {
        
                        if (!scalar(@good_copies)) {
                                $log->info("\tNo (non-current) copies eligible to fill the hold.");
        
                        if (!scalar(@good_copies)) {
                                $log->info("\tNo (non-current) copies eligible to fill the hold.");
-                               if (
-                                 $old_best &&
-                                 grep { $old_best eq $_ } @$all_copies &&
-                                 !action::hold_request->search_where({ current_copy => $old_best->id, capture_time => undef, cancel_time => undef })
-                               ) {
+                               if ( $old_best && grep { ''.$old_best->id eq ''.$_->id } @$all_copies ) {
                                        # the old copy is still available
                                        $log->debug("\tPushing current_copy back onto the targeting list");
                                        push @good_copies, $old_best;
                                        # the old copy is still available
                                        $log->debug("\tPushing current_copy back onto the targeting list");
                                        push @good_copies, $old_best;