Bug 22511: (QA follow-up) Fix update database

Test plan:
Run db update (and have some voided accountlines)
--> without patch it fails with error message similar to:
    Can't use string ("Payment") as a HASH ref while "strict refs" in use at
    (eval 1393) line 19.
--> with patch it runs as expected

Signed-off-by: Josef Moravec <josef.moravec@gmail.com>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>

Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
This commit is contained in:
Josef Moravec 2019-04-25 08:25:42 +00:00 committed by Nick Clemens
parent 69bd858712
commit 1e95b94ea0
1 changed files with 1 additions and 1 deletions

View File

@ -15,7 +15,7 @@ if ( CheckVersion($DBversion) ) {
$sth->execute();
while (my $row = $sth->fetchrow_hashref) {
$sth2->execute($row->{accountlines_id});
my $result = $sth2->fetchrow;
my $result = $sth2->fetchrow_hashref;
my $type = $types_map->{$result->{'type'}} // 'Pay';
$sth3->execute($type,$row->{accountlines_id});
}