mirror of
https://github.com/firefly-iii/firefly-iii.git
synced 2025-09-16 09:51:16 +00:00
Fix issue with prefilled piggy banks.
This commit is contained in:
@@ -231,8 +231,8 @@ class PiggyBankFactory
|
||||
foreach ($accounts as $info) {
|
||||
if ($account->id === $info['account_id']) {
|
||||
if (array_key_exists($account->id, $accounts)) {
|
||||
$toBeLinked[$account->id] = ['current_amount' => $account->pivot->current_amount];
|
||||
Log::debug(sprintf('Prefilled for account #%d with amount %s', $account->id, $account->pivot->current_amount));
|
||||
$toBeLinked[$account->id] = ['current_amount' => $account->pivot->current_amount ?? '0'];
|
||||
Log::debug(sprintf('Prefilled for account #%d with amount %s', $account->id, $account->pivot->current_amount ?? '0'));
|
||||
}
|
||||
}
|
||||
}
|
||||
|
Reference in New Issue
Block a user