(Bug 3767 - Return error if checkin passed an invalid item
If an invalid item barcode is passed to checkin the sip2 connection dies. This is because although no item object is created its mehods are called in Checkin To maintain the connection properly catch the condition and return the correct response to the unit (should also fix Bug #3696 ) Signed-off-by: Galen Charlton <gmcharlt@gmail.com>
This commit is contained in:
parent
0f5cba428d
commit
1deaecb6d8
|
|
@ -180,7 +180,13 @@ sub checkin {
|
|||
# BEGIN TRANSACTION
|
||||
$circ->item($item = new ILS::Item $item_id);
|
||||
|
||||
$circ->do_checkin($current_loc, $return_date);
|
||||
if ($item) {
|
||||
$circ->do_checkin($current_loc, $return_date);
|
||||
} else {
|
||||
$circ->alert(1);
|
||||
$circ->alert_type(99);
|
||||
$circ->screen_msg('Invalid Item');
|
||||
}
|
||||
# It's ok to check it in if it exists, and if it was checked out
|
||||
$circ->ok($item && $item->{patron});
|
||||
|
||||
|
|
|
|||
Loading…
Reference in New Issue