From: miker Date: Mon, 28 Jan 2008 22:05:11 +0000 (+0000) Subject: protect hold targeter against deleted records X-Git-Url: https://old-git.evergreen-ils.org/?a=commitdiff_plain;h=c38af103dae7207610fea2f7432fb18c44bc0b59;p=Evergreen.git protect hold targeter against deleted records git-svn-id: svn://svn.open-ils.org/ILS/branches/rel_1_2@8521 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 2e069e7efa..2d1e07547d 100644 --- a/Open-ILS/src/perlmods/OpenILS/Application/Storage/Publisher/action.pm +++ b/Open-ILS/src/perlmods/OpenILS/Application/Storage/Publisher/action.pm @@ -786,7 +786,7 @@ sub new_hold_copy_targeter { $log->info("Processing hold ".$hold->id."...\n"); #first, re-fetch the hold, to make sure it's not captured already - $hold->remove_from_object_index(); + $hold->remove_from_object_index(); $hold = action::hold_request->retrieve( $hold->id ); die "OK\n" if (!$hold or $hold->capture_time); @@ -806,7 +806,11 @@ sub new_hold_copy_targeter { {$_->record} metabib::record_descriptor ->search( - record => [ map { $_->id } metabib::metarecord->retrieve($hold->target)->source_records ], + record => [ + map { + isTrue($_->deleted) ? () : ($_->id) + } metabib::metarecord->retrieve($hold->target)->source_records + ], ( $types ? (item_type => [split '', $types]) : () ), ( $formats ? (item_form => [split '', $formats]) : () ), ( $lang ? (item_lang => $lang) : () ),