Fix "Clear Shelf Expired Holds" checkin modifier
authorThomas Berezansky <tsbere@mvlc.org>
Mon, 30 Jan 2012 15:09:17 +0000 (10:09 -0500)
committerBill Erickson <berick@esilibrary.com>
Mon, 30 Jan 2012 18:17:17 +0000 (13:17 -0500)
By not looking up empty arrays there either.

Signed-off-by: Thomas Berezansky <tsbere@mvlc.org>
Signed-off-by: Bill Erickson <berick@esilibrary.com>

Open-ILS/src/perlmods/lib/OpenILS/Application/Circ/Holds.pm

index fe1b930..17ae306 100644 (file)
@@ -3445,7 +3445,8 @@ sub clear_shelf_process {
         # refetch the holds to pick up the caclulated cancel_time, 
         # which may be needed by Action/Trigger
         $e->xact_begin;
-        my $updated_holds = $e->search_action_hold_request({id => \@canceled_holds}, {substream => 1});
+        my $updated_holds = [];
+        $updated_holds = $e->search_action_hold_request({id => \@canceled_holds}, {substream => 1}) if (@canceled_holds > 0);
         $e->rollback;
 
         $U->create_events_for_hook(