]> git.evergreen-ils.org Git - Evergreen.git/commit
Deal with opt-in boundaries defensively
authorDan Scott <dscott@laurentian.ca>
Fri, 17 Aug 2012 20:07:19 +0000 (16:07 -0400)
committerBen Shum <bshum@biblio.org>
Tue, 29 Jan 2013 06:06:40 +0000 (01:06 -0500)
commit47b17025cbc82a9435b68323b29a6768ff7645ad
tree151ac3782b7caff1639fb4c71c9a9d65cb667383
parent273f7d81d0d25204dd2c67b93e1a687c18358729
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@laurentian.ca>
Signed-off-by: James Fournie <jfournie@sitka.bclibraries.ca>
Signed-off-by: Ben Shum <bshum@biblio.org>
Open-ILS/src/perlmods/lib/OpenILS/Application/Actor.pm