[open-ils-commits] [GIT] Evergreen ILS branch rel_2_3 updated. d3cdd1b282b05b5326be0685b753b39c554b2b4a
Evergreen Git
git at git.evergreen-ils.org
Wed Sep 19 10:17:29 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, rel_2_3 has been updated
via d3cdd1b282b05b5326be0685b753b39c554b2b4a (commit)
from 0bc6db4c7e0ec656437576b094c7381be6d722f0 (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 d3cdd1b282b05b5326be0685b753b39c554b2b4a
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