[open-ils-commits] [GIT] Evergreen ILS branch master updated. 80e1c87653c01ccb67d011146c13fa02ed2f23d3
Evergreen Git
git at git.evergreen-ils.org
Wed Oct 19 16:59:49 EDT 2011
This is an automated email from the git hooks/post-receive script. It was
generated because a ref change was pushed to the repository containing
the project "Evergreen ILS".
The branch, master has been updated
via 80e1c87653c01ccb67d011146c13fa02ed2f23d3 (commit)
from 47d7b67590ec7a7566982ede9c05d10b9ae18947 (commit)
Those revisions listed above that are new to this repository have
not appeared on any other notification email; so we list those
revisions in full, below.
- Log -----------------------------------------------------------------
commit 80e1c87653c01ccb67d011146c13fa02ed2f23d3
Author: Bill Erickson <berick at esilibrary.com>
Date: Wed Oct 19 16:53:44 2011 -0400
TPac; Fetch authoritative user object in my-account
Since user data changes in my-account, any time we fetch the fleshed
user object, fetch it within a transaction to avoid retrieval from a
(potentially lagging) DB replica.
Signed-off-by: Bill Erickson <berick at esilibrary.com>
Signed-off-by: Lebbeous Fogle-Weekley <lebbeous at esilibrary.com>
diff --git a/Open-ILS/src/perlmods/lib/OpenILS/WWW/EGCatLoader/Account.pm b/Open-ILS/src/perlmods/lib/OpenILS/WWW/EGCatLoader/Account.pm
index a1c2de4..a532bff 100644
--- a/Open-ILS/src/perlmods/lib/OpenILS/WWW/EGCatLoader/Account.pm
+++ b/Open-ILS/src/perlmods/lib/OpenILS/WWW/EGCatLoader/Account.pm
@@ -15,6 +15,11 @@ my $U = 'OpenILS::Application::AppUtils';
sub prepare_extended_user_info {
my $self = shift;
my @extra_flesh = @_;
+ my $e = $self->editor;
+
+ # are we already in a transaction?
+ my $local_xact = !$e->{xact_id};
+ $e->xact_begin if $local_xact;
$self->ctx->{user} = $self->editor->retrieve_actor_user([
$self->ctx->{user}->id,
@@ -25,7 +30,12 @@ sub prepare_extended_user_info {
# ...
}
}
- ]) or return Apache2::Const::HTTP_INTERNAL_SERVER_ERROR;
+ ]);
+
+ $e->rollback if $local_xact;
+
+ return Apache2::Const::HTTP_INTERNAL_SERVER_ERROR
+ unless $self->ctx->{user};
return;
}
-----------------------------------------------------------------------
Summary of changes:
.../lib/OpenILS/WWW/EGCatLoader/Account.pm | 12 +++++++++++-
1 files changed, 11 insertions(+), 1 deletions(-)
hooks/post-receive
--
Evergreen ILS
More information about the open-ils-commits
mailing list