From 74f7dc93badf605a47b9e7e1d72d1914cf3de743 Mon Sep 17 00:00:00 2001 From: dbs Date: Wed, 8 Apr 2009 04:22:23 +0000 Subject: [PATCH] Backport r12816 from trunk: Fix open-ils.ingest.full.biblio.record_list * Pass a reference to the list, rather than a scalar * Fix the return value by returning a true count, rather than a sum of the processed IDs git-svn-id: svn://svn.open-ils.org/ILS/branches/rel_1_4@12817 dcc99617-32d9-48b4-a31d-7c20da2025e4 --- Open-ILS/src/perlmods/OpenILS/Application/Ingest.pm | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/Open-ILS/src/perlmods/OpenILS/Application/Ingest.pm b/Open-ILS/src/perlmods/OpenILS/Application/Ingest.pm index f9ee0ac30d..5756291b10 100644 --- a/Open-ILS/src/perlmods/OpenILS/Application/Ingest.pm +++ b/Open-ILS/src/perlmods/OpenILS/Application/Ingest.pm @@ -319,7 +319,7 @@ sub rw_biblio_ingest_record_list { my $cstore = OpenSRF::AppSession->connect( 'open-ils.cstore' ); $cstore->request('open-ils.cstore.transaction.begin')->gather(1); - my $r = $cstore->request( 'open-ils.cstore.direct.biblio.record_entry.search.atomic' => { id => $rec } )->gather(1); + my $r = $cstore->request( 'open-ils.cstore.direct.biblio.record_entry.search.atomic' => { id => \@rec } )->gather(1); $cstore->request('open-ils.cstore.transaction.rollback')->gather(1); $cstore->disconnect; @@ -327,8 +327,11 @@ sub rw_biblio_ingest_record_list { return undef unless ($r and @$r); my $count = 0; - $count += ($self->method_lookup("open-ils.ingest.full.biblio.object")->run($_))[0] for (@$r); - + for (@$r) { + if (($self->method_lookup("open-ils.ingest.full.biblio.object")->run($_))[0]) { + $count++ + } + } return $count; } __PACKAGE__->register_method( -- 2.11.0