[open-ils-commits] [GIT] Evergreen ILS branch master updated. 5a47a857c5994f1251341391fd4123148f22c441
Evergreen Git
git at git.evergreen-ils.org
Tue Jan 29 01:07:47 EST 2013
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 5a47a857c5994f1251341391fd4123148f22c441 (commit)
from 37794afa3eff7fa01f7dce7f1c411d9997dc1060 (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 5a47a857c5994f1251341391fd4123148f22c441
Author: Dan Scott <dscott at laurentian.ca>
Date: Fri Aug 17 16:07:19 2012 -0400
Deal with opt-in boundaries defensively
If a site had not set an 'org.patron_opt_default' OU setting, then it
seemed that a DEFAULT value was getting dumped into the "create opt-in"
INSERT statement for the org_unit argument, and that (as there is a
non-NULL constraint on the column and no default value for the column)
resulted in the patron not getting opted in.
One way for sites to deal with this is to set an opt-in boundary at the
consortial level, along the lines of:
INSERT INTO actor.org_unit_setting (org_unit, name, value)
VALUES (1, 'org.patron_opt_default', 2);
Alternatively, in the absense of any such setting, opt-in should
continue to work as it had before the new feature was added; this change
keeps the old behaviour active in that case.
Signed-off-by: Dan Scott <dscott at laurentian.ca>
Signed-off-by: James Fournie <jfournie at sitka.bclibraries.ca>
Signed-off-by: Ben Shum <bshum at biblio.org>
diff --git a/Open-ILS/src/perlmods/lib/OpenILS/Application/Actor.pm b/Open-ILS/src/perlmods/lib/OpenILS/Application/Actor.pm
index 1e79cb5..5f6073f 100644
--- a/Open-ILS/src/perlmods/lib/OpenILS/Application/Actor.pm
+++ b/Open-ILS/src/perlmods/lib/OpenILS/Application/Actor.pm
@@ -3123,8 +3123,11 @@ sub create_user_opt_in_at_org {
# get the org unit at that depth
my $org = $e->json_query({
from => [ 'actor.org_unit_ancestor_at_depth', $wsou, $opt_depth ]})->[0];
-
- $org_id = $org->{id};
+ $org_id = $org->{id};
+ }
+ if (!$org_id) {
+ # fall back to the workstation OU, the pre-opt-in-boundary way
+ $org_id = $e->requestor->ws_ou;
}
my $user = $e->retrieve_actor_user($user_id) or return $e->die_event;
-----------------------------------------------------------------------
Summary of changes:
.../src/perlmods/lib/OpenILS/Application/Actor.pm | 7 +++++--
1 files changed, 5 insertions(+), 2 deletions(-)
hooks/post-receive
--
Evergreen ILS
More information about the open-ils-commits
mailing list