From: erickson Date: Wed, 14 Oct 2009 21:02:41 +0000 (+0000) Subject: thinko on rollback vs. commit when creating a local cstoreEditor object for user... X-Git-Url: https://old-git.evergreen-ils.org/?a=commitdiff_plain;h=ef8398c2a08b7104ec76adf1def36f924d0ee663;p=Evergreen.git thinko on rollback vs. commit when creating a local cstoreEditor object for user penalty calculation/creation git-svn-id: svn://svn.open-ils.org/ILS/branches/rel_1_6@14425 dcc99617-32d9-48b4-a31d-7c20da2025e4 --- diff --git a/Open-ILS/src/perlmods/OpenILS/Utils/Penalty.pm b/Open-ILS/src/perlmods/OpenILS/Utils/Penalty.pm index 596a016bdf..24d7361239 100644 --- a/Open-ILS/src/perlmods/OpenILS/Utils/Penalty.pm +++ b/Open-ILS/src/perlmods/OpenILS/Utils/Penalty.pm @@ -17,10 +17,10 @@ my $U = "OpenILS::Application::AppUtils"; sub calculate_penalties { my($class, $e, $user_id, $context_org) = @_; - my $rollback = 0; + my $commit = 0; unless($e) { $e = new_editor(xact =>1); - $rollback = 1; + $commit = 1; } my $penalties = $e->json_query({from => ['actor.calculate_system_penalties',$user_id, $context_org]}); @@ -60,7 +60,7 @@ sub calculate_penalties { } } - $e->rollback if $rollback; + $e->commit if $commit; return undef; }