Bug 38505: CanBookBeIssued preparation: Appropriate behavior when barcode is falsy
Before applying this patch, apply the CanBookBeIssued preparation: tests patch and run that, Verify it fails, apply this patch. Run that same tests file again. ----- About this change ----- CanBookBeIssued wants to find one item given a barcode. If a falsy (undef, empty) barcode is supplied, UNKNOWN_BARCODE should be returned. Ensure this change does not introduce any regressions: prove t/db_dependent/Circulation* prove t/db_dependent/DecreaseLoanHighHolds.t prove t/db_dependent/rollingloans.t prove t/db_dependent/api/v1/checkouts.t prove t/db_dependent/Patron/Borrower_PrevCheckout.t Signed-off-by: Ray Delahunty <r.delahunty@arts.ac.uk> Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com> Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
This commit is contained in:
parent
45626c75c4
commit
89b7f160a7
|
|
@ -780,7 +780,7 @@ sub CanBookBeIssued {
|
|||
my $onsite_checkout = $params->{onsite_checkout} || 0;
|
||||
my $override_high_holds = $params->{override_high_holds} || 0;
|
||||
|
||||
my $item_object = $params->{item}
|
||||
my $item_object = !$barcode ? undef : $params->{item}
|
||||
// Koha::Items->find( { barcode => $barcode } );
|
||||
|
||||
# MANDATORY CHECKS - unless item exists, nothing else matters
|
||||
|
|
|
|||
Loading…
Reference in New Issue