[open-ils-commits] [GIT] Evergreen ILS branch master updated. af09729c89349ff84e901de905a396b78bd3e5e8
Evergreen Git
git at git.evergreen-ils.org
Wed Sep 19 10:17:00 EDT 2012
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 af09729c89349ff84e901de905a396b78bd3e5e8 (commit)
from e1a7501799119e0f305616af5bf97149d9bdf4c0 (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 af09729c89349ff84e901de905a396b78bd3e5e8
Author: Bill Erickson <berick at esilibrary.com>
Date: Mon Sep 17 08:48:26 2012 -0400
Protect against fleshed circ_lib in legacy check_age_protect
Retrieving org settings with an org unit object as the context org unit
results in errors and dying.
This affects legacy scripts only.
Signed-off-by: Bill Erickson <berick at esilibrary.com>
Signed-off-by: Michael Peters <mrpeters at library.in.gov>
diff --git a/Open-ILS/src/perlmods/lib/OpenILS/Utils/PermitHold.pm b/Open-ILS/src/perlmods/lib/OpenILS/Utils/PermitHold.pm
index c80a5d5..c453019 100644
--- a/Open-ILS/src/perlmods/lib/OpenILS/Utils/PermitHold.pm
+++ b/Open-ILS/src/perlmods/lib/OpenILS/Utils/PermitHold.pm
@@ -162,8 +162,10 @@ sub check_age_protect {
{ order_by => 'age' }
);
+ # circ_lib may be fleshed
+ my $context_org = ref $copy->circ_lib ? $copy->circ_lib->id : $copy->circ_lib;
my $age_protect_date = $copy->create_date;
- $age_protect_date = $copy->active_date if($U->ou_ancestor_setting_value($copy->circ_lib, 'circ.holds.age_protect.active_date'));
+ $age_protect_date = $copy->active_date if($U->ou_ancestor_setting_value($context_org, 'circ.holds.age_protect.active_date'));
my $age = 0;
my $age_protect_parsed;
-----------------------------------------------------------------------
Summary of changes:
.../src/perlmods/lib/OpenILS/Utils/PermitHold.pm | 4 +++-
1 files changed, 3 insertions(+), 1 deletions(-)
hooks/post-receive
--
Evergreen ILS
More information about the open-ils-commits
mailing list