[open-ils-commits] r488 - conifer/trunk/circ (dbs)
svn at svn.open-ils.org
svn at svn.open-ils.org
Fri May 15 16:47:47 EDT 2009
Author: dbs
Date: 2009-05-15 16:47:43 -0400 (Fri, 15 May 2009)
New Revision: 488
Modified:
conifer/trunk/circ/circ_duration.js
Log:
Enable fall-through to system defaults if specific rules aren't found
Modified: conifer/trunk/circ/circ_duration.js
===================================================================
--- conifer/trunk/circ/circ_duration.js 2009-05-15 17:59:37 UTC (rev 487)
+++ conifer/trunk/circ/circ_duration.js 2009-05-15 20:47:43 UTC (rev 488)
@@ -4,14 +4,18 @@
load_lib('JSON_v1.js');
log_vars('circ_duration');
-/* load circ rules for specific institutions */
-var circ_duration_institution_file = 'circ/circ_duration_' + currentLocation.shortname + '.js';
-load_lib(circ_duration_institution_file);
+try {
+ /* load circ rules for specific institutions */
+ var circ_duration_institution_file = 'circ/circ_duration_' + currentLocation.shortname + '.js';
+ load_lib(circ_duration_institution_file);
-log_error(circ_duration_institution_file);
+ log_error(circ_duration_institution_file);
-/* if an institution specific script was loaded, then stop */
-if (result.durationRule) return;
+ /* if an institution specific script was loaded, then stop */
+ if (result.durationRule) return;
+} catch (e) {
+ // fall through to system-wide defaults
+}
/* treat pre-cat copies like vanilla books */
if( isTrue(isPrecat) ) {
More information about the open-ils-commits
mailing list