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>
};
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;