From 5a4194ead493623f9b3144f6f156890cdd25e594 Mon Sep 17 00:00:00 2001 From: Tomas Cohen Arazi Date: Fri, 29 Jul 2022 15:38:51 -0300 Subject: [PATCH] Bug 30650: (QA follow-up) Some higher-level methods usage Signed-off-by: Tomas Cohen Arazi --- Koha/CurbsidePickup.pm | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/Koha/CurbsidePickup.pm b/Koha/CurbsidePickup.pm index f9fce8baa9..cbbd1632d3 100644 --- a/Koha/CurbsidePickup.pm +++ b/Koha/CurbsidePickup.pm @@ -62,8 +62,7 @@ sub new { if ( $policy->enable_waiting_holds_only ) { my $patron = Koha::Patrons->find( $params->{borrowernumber} ); - my $waiting_holds = $patron->holds->search( - { found => 'W', branchcode => $params->{branchcode} } ); + my $waiting_holds = $patron->holds->waiting->search( { branchcode => $params->{branchcode} } ); Koha::Exceptions::CurbsidePickup::NoWaitingHolds->throw unless $waiting_holds->count; @@ -245,7 +244,7 @@ sub mark_as_delivered { my $holds = $patron->holds; my $branchcode = C4::Context->userenv ? C4::Context->userenv->{branch} : undef; foreach my $hold ( $holds->as_list ) { - if ( $hold->found eq 'W' && $branchcode && $hold->branchcode eq $branchcode ) { + if ( $hold->is_waiting && $branchcode && $hold->branchcode eq $branchcode ) { my ( $issuingimpossible, $needsconfirmation ) = C4::Circulation::CanBookBeIssued( $patron, $hold->item->barcode ); -- 2.39.5