Bug 41267: (follow-up) Check if exists

Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
This commit is contained in:
Lucas Gass 2026-04-09 20:08:35 +00:00
parent 397c17e14c
commit 9539b21089
No known key found for this signature in database
GPG Key ID: 60B447398B0D36CA
1 changed files with 6 additions and 4 deletions

View File

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