[open-ils-commits] r13968 - trunk/Open-ILS/src/perlmods/OpenILS/Application (erickson)

svn at svn.open-ils.org svn at svn.open-ils.org
Fri Sep 4 16:17:19 EDT 2009


Author: erickson
Date: 2009-09-04 16:17:14 -0400 (Fri, 04 Sep 2009)
New Revision: 13968

Modified:
   trunk/Open-ILS/src/perlmods/OpenILS/Application/Cat.pm
Log:
on marc record import, call ingest after the create xact has been committed

Modified: trunk/Open-ILS/src/perlmods/OpenILS/Application/Cat.pm
===================================================================
--- trunk/Open-ILS/src/perlmods/OpenILS/Application/Cat.pm	2009-09-04 19:58:38 UTC (rev 13967)
+++ trunk/Open-ILS/src/perlmods/OpenILS/Application/Cat.pm	2009-09-04 20:17:14 UTC (rev 13968)
@@ -255,11 +255,17 @@
     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(



More information about the open-ils-commits mailing list