From: erickson Date: Fri, 4 Sep 2009 20:17:36 +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=f249b8e8ece9a8ce2a9db99dc6b35ac5d7f48ebe;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_6_0@13970 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 2ead43a114..916a1c5f95 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(