diff --git a/Koha/REST/V1/Holds.pm b/Koha/REST/V1/Holds.pm index 142668419e..acd4b78e20 100644 --- a/Koha/REST/V1/Holds.pm +++ b/Koha/REST/V1/Holds.pm @@ -169,7 +169,7 @@ sub add { ? C4::Reserves::CanItemBeReserved( $patron, $item ) : C4::Reserves::CanBookBeReserved( $patron_id, $biblio_id ); - if ( $patron->holds->count + 1 > C4::Context->preference('maxreserves') ) { + if ( C4::Context->preference('maxreserves') && $patron->holds->count + 1 > C4::Context->preference('maxreserves') ) { $can_place_hold->{status} = 'tooManyReserves'; }