Bugzilla – Attachment 94378 Details for
Bug 20086
AddRenewal is not executed as a transaction and can results in partial success and doubled fines
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
Bug 20086: (follow-up) No need to call ->new on Koha::Database
Bug-20086-follow-up-No-need-to-call--new-on-KohaDa.patch (text/plain), 1009 bytes, created by
Martin Renvoize (ashimema)
on 2019-10-17 16:32:03 UTC
(
hide
)
Description:
Bug 20086: (follow-up) No need to call ->new on Koha::Database
Filename:
MIME Type:
Creator:
Martin Renvoize (ashimema)
Created:
2019-10-17 16:32:03 UTC
Size:
1009 bytes
patch
obsolete
>From 6c87c676fa8d496dad9878d86a9610741b112ffe Mon Sep 17 00:00:00 2001 >From: Martin Renvoize <martin.renvoize@ptfs-europe.com> >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 <martin.renvoize@ptfs-europe.com> >--- > 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
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Diff
View Attachment As Raw
Actions:
View
|
Diff
|
Splinter Review
Attachments on
bug 20086
:
70879
|
94374
|
94377
|
94378
|
94421
|
94422