LP#1618992 Work log checkin/user sanity checks
authorBill Erickson <berickxx@gmail.com>
Fri, 16 Sep 2016 21:14:42 +0000 (17:14 -0400)
committerKathy Lussier <klussier@masslnc.org>
Fri, 30 Sep 2016 03:23:06 +0000 (23:23 -0400)
Avoid attempts to log user information during checkin when no user
information is available.

Signed-off-by: Bill Erickson <berickxx@gmail.com>
Signed-off-by: Jennifer Pringle <jennifer.pringle@bc.libraries.coop>
Signed-off-by: Kathy Lussier <klussier@masslnc.org>
Open-ILS/web/js/ui/default/staff/services/ui.js

index 6b4e325..86268d7 100644 (file)
@@ -626,9 +626,11 @@ function($window , egStrings) {
         };
         if (data.action == 'checkin') {
             entry['item'] = data.response.params.copy_barcode;
-            entry['user'] = data.response.data.au.family_name();
             entry['item_id'] = data.response.data.acp.id();
-            entry['patron_id'] = data.response.data.au.id();
+            if (data.response.data.au) {
+                entry['user'] = data.response.data.au.family_name();
+                entry['patron_id'] = data.response.data.au.id();
+            }
         }
         if (data.action == 'checkout') {
             entry['item'] = data.response.params.copy_barcode;