Merge pull request #226 from gradido/bugfix_22_04_21

Bugfix 22 04 21
This commit is contained in:
Ulf Gebhardt 2021-04-27 01:51:18 +02:00 committed by GitHub
commit 4fe9b0c772
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -329,12 +329,14 @@ class AppRequestsController extends AppController
->page($page) ->page($page)
; ;
$decay = true; $decay = true;
$transactions = [];
if($stateUserTransactionsQuery->count() > 0) {
$transactions = $transactionsTable->listTransactionsHumanReadable($stateUserTransactionsQuery->toArray(), $user, $decay); $transactions = $transactionsTable->listTransactionsHumanReadable($stateUserTransactionsQuery->toArray(), $user, $decay);
if($orderDirection == 'DESC') { if($orderDirection == 'DESC') {
$transactions = array_reverse($transactions); $transactions = array_reverse($transactions);
} }
}
return $this->returnJson([ return $this->returnJson([
'state' => 'success', 'state' => 'success',
'transactions' => $transactions, 'transactions' => $transactions,