https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=30856 --- Comment #8 from Jonathan Druart <jonathan.druart@gmail.com> --- (In reply to Tomás Cohen Arazi from comment #6)
(In reply to Nick Clemens (kidclamp) from comment #4)
Instead of fetching the patron just to compare borrowernumber, why not: my $hold = Koha::Holds->find({ reserve_id => $reserve_id, borrowernumber => $borrowernumber });
If the borrowernumebr doesn't match, we don't find a hold, can't cancel?
I used this pattern a lot, and I like how concise it is:
``` my $hold = $patron->holds->find( $hold_id ); ```
Can you please provide a follow-up on top of the patch using that? It's not clear how you make things easiest to read, especially if you want to keep the pattern ($who, $what) in the Koha::Policy namespace. If you want to remove the id comparison it will add an unnecessary DB hit. -- You are receiving this mail because: You are watching all bug changes.