From 1885aa9a3d9789ca7890fa934ec98be550e8c6a2 Mon Sep 17 00:00:00 2001 From: erickson Date: Fri, 4 Aug 2006 14:17:08 +0000 Subject: [PATCH] moved one call back to storage to keep wormize inside a db session git-svn-id: svn://svn.open-ils.org/ILS/trunk@5294 dcc99617-32d9-48b4-a31d-7c20da2025e4 --- Open-ILS/src/perlmods/OpenILS/Application/Cat.pm | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/Open-ILS/src/perlmods/OpenILS/Application/Cat.pm b/Open-ILS/src/perlmods/OpenILS/Application/Cat.pm index 03c0f536ca..15c5304c5c 100644 --- a/Open-ILS/src/perlmods/OpenILS/Application/Cat.pm +++ b/Open-ILS/src/perlmods/OpenILS/Application/Cat.pm @@ -16,6 +16,7 @@ use Unicode::Normalize; use Data::Dumper; use OpenILS::Utils::FlatXML; use OpenILS::Utils::CStoreEditor q/:funcs/; +use OpenILS::Utils::Editor; use OpenILS::Perm; use OpenSRF::Utils::SettingsClient; use OpenSRF::Utils::Logger qw($logger); @@ -160,7 +161,7 @@ __PACKAGE__->register_method( sub biblio_record_replace_marc { my( $self, $conn, $auth, $recid, $newxml, $source ) = @_; - my $e = new_editor(authtoken => $auth, xact => 1); + my $e = OpenILS::Utils::Editor->new(authtoken=>$auth, xact=>1); return $e->event unless $e->checkauth; return $e->event unless $e->allowed('CREATE_MARC'); @@ -174,10 +175,10 @@ sub biblio_record_replace_marc { # If we're not updating the TCN, all we care about it the marcdoc my $override = $self->api_name =~ /override/; + my $storage = OpenSRF::AppSession->create('open-ils.storage'); + my( $tcn, $tsource, $marcdoc, $evt) = - _find_tcn_info( - OpenSRF::AppSession->create('open-ils.storage'), - $newxml, $override, $recid); + _find_tcn_info($e->session, $newxml, $override, $recid); return $evt if $evt; -- 2.11.0