[open-ils-commits] r8568 -
branches/rel_1_2/Open-ILS/xul/staff_client/server/cat
svn at svn.open-ils.org
svn at svn.open-ils.org
Fri Feb 1 10:05:16 EST 2008
Author: phasefx
Date: 2008-02-01 09:37:30 -0500 (Fri, 01 Feb 2008)
New Revision: 8568
Modified:
branches/rel_1_2/Open-ILS/xul/staff_client/server/cat/copy_editor.js
Log:
sidestep race condition with new volumes and db replication.. this should fix the Stat Cat popup errors, but we need to test on weezie
Modified: branches/rel_1_2/Open-ILS/xul/staff_client/server/cat/copy_editor.js
===================================================================
--- branches/rel_1_2/Open-ILS/xul/staff_client/server/cat/copy_editor.js 2008-02-01 14:36:26 UTC (rev 8567)
+++ branches/rel_1_2/Open-ILS/xul/staff_client/server/cat/copy_editor.js 2008-02-01 14:37:30 UTC (rev 8568)
@@ -74,9 +74,16 @@
lib = o.circ_lib(); // base perms on circ_lib instead of owning_lib if pre-cat
} else {
if (! g.map_acn[ cn_id ]) {
- g.map_acn[ cn_id ] = g.network.simple_request('FM_ACN_RETRIEVE',[ cn_id ]);
+ var req = g.network.simple_request('FM_ACN_RETRIEVE',[ cn_id ]);
+ if (typeof req.ilsevent == 'undefined') {
+ g.map_acn[ cn_id ] = req;
+ lib = g.map_acn[ cn_id ].owning_lib();
+ } else {
+ lib = o.circ_lib();
+ }
+ } else {
+ lib = g.map_acn[ cn_id ].owning_lib();
}
- lib = g.map_acn[ cn_id ].owning_lib();
}
return lib;
}
@@ -552,7 +559,12 @@
var cn_id = typeof callnumber == 'object' ? callnumber.id() : callnumber;
if (cn_id > 0) {
if (! g.map_acn[ cn_id ]) {
- g.map_acn[ cn_id ] = g.network.simple_request('FM_ACN_RETRIEVE',[ cn_id ]);
+ var req = g.network.simple_request('FM_ACN_RETRIEVE',[ cn_id ]);
+ if (typeof req.ilsevent == 'undefined') {
+ g.map_acn[ cn_id ] = req;
+ } else {
+ continue;
+ }
}
var consider_lib = g.map_acn[ cn_id ].owning_lib();
if (!consider_lib) continue;
@@ -1383,7 +1395,12 @@
var cn_id = g.copies[i].call_number();
if (cn_id > 0) {
if (! g.map_acn[ cn_id ]) {
- g.map_acn[ cn_id ] = g.network.simple_request('FM_ACN_RETRIEVE',[ cn_id ]);
+ var req = g.network.simple_request('FM_ACN_RETRIEVE',[ cn_id ]);
+ if (typeof req.ilsevent == 'undefined') {
+ g.map_acn[ cn_id ] = req;
+ } else {
+ continue;
+ }
}
var owning_lib = g.map_acn[ cn_id ].owning_lib(); if (typeof owning_lib == 'object') owning_lib = owning_lib.id();
sc_libs[ owning_lib ] = true;
More information about the open-ils-commits
mailing list