Bug 35612: (QA follow-up) Use interface parameter and remove self-referential use
This patch fixes two issues:
1. C4::Accounts::chargelostitem now properly uses the $interface
variable that was set from $opts->{interface} instead of calling
C4::Context->interface directly. This ensures the interface
parameter is honored, particularly important for cronjob context.
2. Removes the self-referential 'use Koha::Checkout;' statement in
Koha/Checkout.pm which is logically incorrect (a module should
not use itself).
Test plan:
1. Run prove t/db_dependent/Accounts.t
2. Run prove t/db_dependent/Koha/Checkout.t
3. Verify all tests pass
Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
This commit is contained in:
parent
b6695f75bd
commit
73ae8a15db
|
|
@ -140,7 +140,7 @@ sub chargelostitem {
|
|||
description => $description,
|
||||
note => $processingfeenote,
|
||||
user_id => C4::Context->userenv ? C4::Context->userenv->{'number'} : undef,
|
||||
interface => C4::Context->interface,
|
||||
interface => $interface,
|
||||
library_id => $library_id,
|
||||
type => 'PROCESSING',
|
||||
item_id => $itemnumber,
|
||||
|
|
@ -157,7 +157,7 @@ sub chargelostitem {
|
|||
description => $description,
|
||||
note => undef,
|
||||
user_id => C4::Context->userenv ? C4::Context->userenv->{'number'} : undef,
|
||||
interface => C4::Context->interface,
|
||||
interface => $interface,
|
||||
library_id => $library_id,
|
||||
type => 'LOST',
|
||||
item_id => $itemnumber,
|
||||
|
|
|
|||
|
|
@ -24,7 +24,6 @@ use DateTime;
|
|||
use Try::Tiny qw( catch try );
|
||||
|
||||
use C4::Circulation qw( AddRenewal CanBookBeRenewed LostItem MarkIssueReturned );
|
||||
use Koha::Checkout;
|
||||
use Koha::Booking;
|
||||
use Koha::Checkouts::Renewals;
|
||||
use Koha::Checkouts::ReturnClaims;
|
||||
|
|
|
|||
Loading…
Reference in New Issue