[open-ils-commits] r8522 - branches/rel_1_2_1/Open-ILS/src/perlmods/OpenILS/Application/Storage/Publisher

svn at svn.open-ils.org svn at svn.open-ils.org
Mon Jan 28 17:33:13 EST 2008


Author: miker
Date: 2008-01-28 17:05:53 -0500 (Mon, 28 Jan 2008)
New Revision: 8522

Modified:
   branches/rel_1_2_1/Open-ILS/src/perlmods/OpenILS/Application/Storage/Publisher/action.pm
Log:
protect hold targeter against deleted records

Modified: branches/rel_1_2_1/Open-ILS/src/perlmods/OpenILS/Application/Storage/Publisher/action.pm
===================================================================
--- branches/rel_1_2_1/Open-ILS/src/perlmods/OpenILS/Application/Storage/Publisher/action.pm	2008-01-28 22:05:11 UTC (rev 8521)
+++ branches/rel_1_2_1/Open-ILS/src/perlmods/OpenILS/Application/Storage/Publisher/action.pm	2008-01-28 22:05:53 UTC (rev 8522)
@@ -786,7 +786,7 @@
 			$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 @@
 						{$_->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)                : () ),



More information about the open-ils-commits mailing list