[open-ils-commits] r14873 - trunk/Open-ILS/xul/staff_client/server/circ (erickson)

svn at svn.open-ils.org svn at svn.open-ils.org
Wed Nov 11 16:28:49 EST 2009


Author: erickson
Date: 2009-11-11 16:28:43 -0500 (Wed, 11 Nov 2009)
New Revision: 14873

Modified:
   trunk/Open-ILS/xul/staff_client/server/circ/alternate_copy_summary.js
Log:
Patch from Lebbeous Fogle-Weekley to prevent staff client exceptions when encounting null workstations on circs in copy details UI

Modified: trunk/Open-ILS/xul/staff_client/server/circ/alternate_copy_summary.js
===================================================================
--- trunk/Open-ILS/xul/staff_client/server/circ/alternate_copy_summary.js	2009-11-11 21:25:06 UTC (rev 14872)
+++ trunk/Open-ILS/xul/staff_client/server/circ/alternate_copy_summary.js	2009-11-11 21:28:43 UTC (rev 14873)
@@ -312,7 +312,7 @@
             set("create_time", details.circ.create_time()); 
             set("workstation", details.circ.workstation()); 
             if (get_bool(details.circ.opac_renewal())||get_bool(details.circ.phone_renewal())||get_bool(details.circ.desk_renewal())) {
-                set("renewal_workstation", typeof details.circ.workstation() == 'object' ? details.circ.workstation().name() : details.circ.workstation() ); 
+                set("renewal_workstation", (typeof details.circ.workstation() == 'object' && details.circ.workstation() != null) ? details.circ.workstation().name() : details.circ.workstation() ); 
                 network.simple_request('FM_CIRC_CHAIN', [ses(), details.circ.id() ], function(req) { // Tiny race condition between details.circ and circs[circs.length-1] here, but meh :)
                     try {
                         var circs = req.getResultObject();



More information about the open-ils-commits mailing list