From 194a49137f254161721b167a7e2133725e8874e9 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 Signed-off-by: Jonathan Druart 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 03b623b331..2800bdf4d4 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.39.5