From: erickson Date: Fri, 4 Sep 2009 20:18:28 +0000 (+0000) Subject: on marc record import, call ingest after the create xact has been committed X-Git-Url: https://old-git.evergreen-ils.org/?a=commitdiff_plain;h=a0db354bce89cddd4ff80f30afc3574f586bcbd0;p=Evergreen.git on marc record import, call ingest after the create xact has been committed git-svn-id: svn://svn.open-ils.org/ILS/branches/rel_1_4_0@13972 dcc99617-32d9-48b4-a31d-7c20da2025e4 --- diff --git a/Open-ILS/src/perlmods/OpenILS/Application/Cat.pm b/Open-ILS/src/perlmods/OpenILS/Application/Cat.pm index 4c6b18791e..e777f44bf7 100644 --- a/Open-ILS/src/perlmods/OpenILS/Application/Cat.pm +++ b/Open-ILS/src/perlmods/OpenILS/Application/Cat.pm @@ -255,11 +255,17 @@ sub biblio_record_xml_import { return $e->die_event unless $e->checkauth; return $e->die_event unless $e->allowed('IMPORT_MARC', $e->requestor->ws_ou); - my $res = OpenILS::Application::Cat::BibCommon->biblio_record_xml_import( - $e, $xml, $source, $auto_tcn, $self->api_name =~ /override/); + my $record = OpenILS::Application::Cat::BibCommon->biblio_record_xml_import( + $e, $xml, $source, $auto_tcn, $self->api_name =~ /override/, 1); - $e->commit unless $U->event_code($res); - return $res; + return $record if $U->event_code($record); + + $e->commit; + + my $ses = OpenSRF::AppSession->create('open-ils.ingest'); + $ses->request('open-ils.ingest.full.biblio.record', $record->id); + + return $record; } __PACKAGE__->register_method(