Bug 31303: (follow-up) Use get_effective_rule_value instead

Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
This commit is contained in:
Tomas Cohen Arazi 2022-08-08 12:09:45 -03:00
parent 38ef4f635d
commit aca26a83e3
No known key found for this signature in database
GPG Key ID: 0A272EA1B2F3C15F
1 changed files with 2 additions and 3 deletions

View File

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