Patch from Lebbeous Fogle-Weekley to prevent staff client exceptions when encounting...
authorerickson <erickson@dcc99617-32d9-48b4-a31d-7c20da2025e4>
Wed, 11 Nov 2009 21:28:43 +0000 (21:28 +0000)
committererickson <erickson@dcc99617-32d9-48b4-a31d-7c20da2025e4>
Wed, 11 Nov 2009 21:28:43 +0000 (21:28 +0000)
git-svn-id: svn://svn.open-ils.org/ILS/trunk@14873 dcc99617-32d9-48b4-a31d-7c20da2025e4

Open-ILS/xul/staff_client/server/circ/alternate_copy_summary.js

index 54e0e81..9485d3d 100644 (file)
@@ -312,7 +312,7 @@ function load_item() {
             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();