Make sure tags work, make sure update is refreshed.

This commit is contained in:
James Cole 2019-08-27 06:08:30 +02:00
parent e209766ad0
commit e308b0f617
2 changed files with 2 additions and 2 deletions

View File

@ -212,7 +212,7 @@ class RecurrenceUpdateRequest extends Request
// new and updated fields:
'piggy_bank_id' => isset($transaction['piggy_bank_id']) ? (int)$transaction['piggy_bank_id'] : null,
'piggy_bank_name' => $transaction['piggy_bank_name'] ?? null,
'tags' => $transaction['tags'],
'tags' => $transaction['tags'] ?? [],
'budget_id' => isset($transaction['budget_id']) ? (int)$transaction['budget_id'] : null,
'budget_name' => $transaction['budget_name'] ?? null,
'category_id' => isset($transaction['category_id']) ? (int)$transaction['category_id'] : null,

View File

@ -276,7 +276,7 @@ class RecurrenceTransformer extends AbstractTransformer
$return = [];
// get all transactions:
/** @var RecurrenceTransaction $transaction */
foreach ($recurrence->recurrenceTransactions as $transaction) {
foreach ($recurrence->recurrenceTransactions()->get() as $transaction) {
$sourceAccount = $transaction->sourceAccount;
$destinationAccount = $transaction->destinationAccount;