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 <m.de.rooy@rijksmuseum.nl>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
This commit is contained in:
Marcel de Rooy 2022-10-28 07:46:43 +00:00 committed by Tomas Cohen Arazi
parent 68f7ea8cdf
commit ee7234640b
Signed by: tomascohen
GPG key ID: 0A272EA1B2F3C15F
2 changed files with 2 additions and 2 deletions

View file

@ -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
}
}
);

View file

@ -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;
};