ignore deleted records within a metarecord
authormiker <miker@dcc99617-32d9-48b4-a31d-7c20da2025e4>
Mon, 28 Jan 2008 17:13:33 +0000 (17:13 +0000)
committermiker <miker@dcc99617-32d9-48b4-a31d-7c20da2025e4>
Mon, 28 Jan 2008 17:13:33 +0000 (17:13 +0000)
git-svn-id: svn://svn.open-ils.org/ILS/trunk@8513 dcc99617-32d9-48b4-a31d-7c20da2025e4

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

index 65e0eeb..9231f4c 100644 (file)
@@ -838,7 +838,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)                : () ),