From aca26a83e367ae930eeb22241ef3af7b4244d127 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 c662a08a6c..73eec43ccb 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.39.5