From ee7234640b04806dd949f40e2a786c1359198837 Mon Sep 17 00:00:00 2001 From: Marcel de Rooy Date: Fri, 28 Oct 2022 07:46:43 +0000 Subject: [PATCH] Bug 31895: (QA follow-up) Rollback change, add comment Rollback should really be the last statement. I am leaving get_from_storage here, but add a comment that it seems unneeded at this moment. The Koha::Account::Offset->new and C4::Stats::UpdateStats wont change the line.. But since the distance in code is becoming a bit larger, I wont complain. Signed-off-by: Marcel de Rooy Signed-off-by: Tomas Cohen Arazi --- Koha/Account.pm | 2 +- t/db_dependent/Koha/Plugins/Account_hooks.t | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/Koha/Account.pm b/Koha/Account.pm index 960a2f677d..e37e646596 100644 --- a/Koha/Account.pm +++ b/Koha/Account.pm @@ -263,7 +263,7 @@ sub add_credit { action => "add_credit", payload => { type => lc($credit_type), - line => $line->get_from_storage + line => $line->get_from_storage, #TODO Seems unneeded } } ); diff --git a/t/db_dependent/Koha/Plugins/Account_hooks.t b/t/db_dependent/Koha/Plugins/Account_hooks.t index 8cfbec623b..3d27dc1be8 100755 --- a/t/db_dependent/Koha/Plugins/Account_hooks.t +++ b/t/db_dependent/Koha/Plugins/Account_hooks.t @@ -69,6 +69,6 @@ subtest 'Koha::Account tests' => sub { qr/after_account_action called with action: add_credit, type: payment, ref: Koha::Account::Line/, '->add_credit calls the after_account_action hook with type payment'; - $schema->storage->txn_rollback; Koha::Plugins::Methods->delete; + $schema->storage->txn_rollback; };