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

svn at svn.open-ils.org svn at svn.open-ils.org
Wed Sep 30 11:46:40 EDT 2009


Author: phasefx
Date: 2009-09-30 11:46:37 -0400 (Wed, 30 Sep 2009)
New Revision: 14223

Modified:
   trunk/Open-ILS/xul/staff_client/server/circ/alternate_copy_summary.js
Log:
this should handle nulls for the library fields

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-09-30 15:33:59 UTC (rev 14222)
+++ trunk/Open-ILS/xul/staff_client/server/circ/alternate_copy_summary.js	2009-09-30 15:46:37 UTC (rev 14223)
@@ -269,14 +269,14 @@
         set("payment_total", '');
 
         if (details.circ) {
-            set("checkin_lib", typeof details.circ.checkin_lib() == 'object' ? details.circ.checkin_lib().shortname() : data.hash.aou[ details.circ.checkin_lib() ].shortname() ); 
+            try { set("checkin_lib", typeof details.circ.checkin_lib() == 'object' ? details.circ.checkin_lib().shortname() : data.hash.aou[ details.circ.checkin_lib() ].shortname() );  } catch(E) {};
             if (details.circ.checkin_workstation()) {
                 set("checkin_workstation", details.circ.checkin_workstation().name()); 
             }
             set("checkin_staff", details.circ.checkin_staff()); 
             set("checkin_time", details.circ.checkin_time()); 
             set("checkin_scan_time", details.circ.checkin_scan_time()); 
-            set("circ_circ_lib" , typeof details.circ.circ_lib() == 'object' ? details.circ.circ_lib().shortname() : data.hash.aou[ details.circ.circ_lib() ].shortname() ); 
+            try { set("circ_circ_lib" , typeof details.circ.circ_lib() == 'object' ? details.circ.circ_lib().shortname() : data.hash.aou[ details.circ.circ_lib() ].shortname() );  } catch(E) {};
             set("circ_staff", details.circ.circ_staff()); 
             set("desk_renewal", details.circ.desk_renewal()); 
             set("due_date", details.circ.due_date()); 
@@ -349,16 +349,16 @@
             set("current_copy", details.hold.current_copy()); 
             set("email_notify", details.hold.email_notify()); 
             set("expire_time", details.hold.expire_time()); 
-            set("fulfillment_lib" , typeof details.hold.fulfillment_lib() == 'object' ? details.hold.fulfillment_lib().shortname() : data.hash.aou[ details.hold.fulfillment_lib() ].shortname() ); 
+            try { set("fulfillment_lib" , typeof details.hold.fulfillment_lib() == 'object' ? details.hold.fulfillment_lib().shortname() : data.hash.aou[ details.hold.fulfillment_lib() ].shortname() );  } catch(E) {}
             set("fulfillment_staff", details.hold.fulfillment_staff()); 
             set("fulfillment_time", details.hold.fulfillment_time()); 
             set("hold_type", details.hold.hold_type()); 
             set("holdable_formats", details.hold.holdable_formats()); 
             set("hold_id", details.hold.id()); 
             set("phone_notify", details.hold.phone_notify()); 
-            set("pickup_lib" , typeof details.hold.pickup_lib() == 'object' ? details.hold.pickup_lib().shortname() : data.hash.aou[ details.hold.pickup_lib() ].shortname() ); 
+            try { set("pickup_lib" , typeof details.hold.pickup_lib() == 'object' ? details.hold.pickup_lib().shortname() : data.hash.aou[ details.hold.pickup_lib() ].shortname() );  } catch(E) {}
             set("prev_check_time", details.hold.prev_check_time()); 
-            set("request_lib" , typeof details.hold.request_lib() == 'object' ? details.hold.request_lib().shortname() : data.hash.aou[ details.hold.request_lib() ].shortname() ); 
+            try { set("request_lib" , typeof details.hold.request_lib() == 'object' ? details.hold.request_lib().shortname() : data.hash.aou[ details.hold.request_lib() ].shortname() ); } catch(E) {}
             set("request_time", details.hold.request_time()); 
             set("requestor", details.hold.requestor()); 
             set("selection_depth", details.hold.selection_depth()); 



More information about the open-ils-commits mailing list