Bug 41267: (follow-up) Check if exists
Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
This commit is contained in:
parent
397c17e14c
commit
9539b21089
|
|
@ -2195,10 +2195,12 @@ sub MoveReserve {
|
|||
|
||||
if ( $cancelreserve && $res ) {
|
||||
$hold = Koha::Holds->find( $res->{reserve_id} );
|
||||
if ( $cancelreserve eq 'revert' ) {
|
||||
$hold->revert_found();
|
||||
} else { # cancel reserves on this item
|
||||
$hold->cancel;
|
||||
if ($hold) {
|
||||
if ( $cancelreserve eq 'revert' ) {
|
||||
$hold->revert_found();
|
||||
} else { # cancel reserves on this item
|
||||
$hold->cancel;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in New Issue