From fc07723d80844d72f1703d4ca0b20a3d6d94a364 Mon Sep 17 00:00:00 2001 From: Tomas Cohen Arazi Date: Mon, 8 Aug 2022 12:09:45 -0300 Subject: [PATCH] Bug 31303: (follow-up) Use get_effective_rule_value instead Signed-off-by: Tomas Cohen Arazi --- Koha/Hold.pm | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/Koha/Hold.pm b/Koha/Hold.pm index c662a08a6c5..73eec43ccb4 100644 --- a/Koha/Hold.pm +++ b/Koha/Hold.pm @@ -460,15 +460,14 @@ sub cancellation_requestable_from_opac { $controlbranch = $item->homebranch; } - my $rule = Koha::CirculationRules->get_effective_rule( + return Koha::CirculationRules->get_effective_rule_value( { categorycode => $patron->categorycode, itemtype => $item->itype, branchcode => $controlbranch, rule_name => 'waiting_hold_cancellation', } - ); - return ( $rule && $rule->rule_value ) ? 1 : 0; + ) ? 1 : 0; } =head3 is_at_destination -- 2.34.1