From 6c87c676fa8d496dad9878d86a9610741b112ffe Mon Sep 17 00:00:00 2001 From: Martin Renvoize Date: Thu, 17 Oct 2019 17:28:15 +0100 Subject: [PATCH] Bug 20086: (follow-up) No need to call ->new on Koha::Database We should use the existing pattern of calling schema directly on Koha::Database rather than creating a new object. Signed-off-by: Martin Renvoize --- C4/Circulation.pm | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/C4/Circulation.pm b/C4/Circulation.pm index fbf9179eed..2b31797e73 100644 --- a/C4/Circulation.pm +++ b/C4/Circulation.pm @@ -2864,7 +2864,7 @@ sub AddRenewal { my $circ_library = Koha::Libraries->find( _GetCircControlBranch($item_unblessed, $patron_unblessed) ); - my $schema = Koha::Database->new->schema; + my $schema = Koha::Database->schema; $schema->txn_do(sub{ if ( C4::Context->preference('CalculateFinesOnReturn') && $issue->is_overdue ) { -- 2.20.1