[open-ils-commits] r12964 - trunk/Open-ILS/src/perlmods/OpenILS/Utils (erickson)
svn at svn.open-ils.org
svn at svn.open-ils.org
Wed Apr 22 13:07:53 EDT 2009
Author: erickson
Date: 2009-04-22 13:07:50 -0400 (Wed, 22 Apr 2009)
New Revision: 12964
Modified:
trunk/Open-ILS/src/perlmods/OpenILS/Utils/CStoreEditor.pm
Log:
prevent erroneous error message on xact begin when an exact already exists
Modified: trunk/Open-ILS/src/perlmods/OpenILS/Utils/CStoreEditor.pm
===================================================================
--- trunk/Open-ILS/src/perlmods/OpenILS/Utils/CStoreEditor.pm 2009-04-22 16:46:56 UTC (rev 12963)
+++ trunk/Open-ILS/src/perlmods/OpenILS/Utils/CStoreEditor.pm 2009-04-22 17:07:50 UTC (rev 12964)
@@ -210,11 +210,13 @@
return $self->{xact_id} if $self->{xact_id};
$self->session->connect unless $self->session->state == OpenSRF::AppSession::CONNECTED();
$self->log(D, "starting new database transaction");
- my $stat = $self->request($self->app . '.transaction.begin') unless $self->{xact_id};
- $self->log(E, "error starting database transaction") unless $stat;
- $self->{xact_id} = $stat;
+ unless($self->{xact_id}) {
+ my $stat = $self->request($self->app . '.transaction.begin');
+ $self->log(E, "error starting database transaction") unless $stat;
+ $self->{xact_id} = $stat;
+ }
$self->{xact} = 1;
- return $stat;
+ return $self->{xact_id};
}
# -----------------------------------------------------------------------------
More information about the open-ils-commits
mailing list