By not looking up empty arrays there either.
Signed-off-by: Thomas Berezansky <tsbere@mvlc.org>
Signed-off-by: Bill Erickson <berick@esilibrary.com>
# 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(