This commit is contained in:
James Cole
2025-02-22 08:03:42 +01:00
parent 56470bfbba
commit 48c1b525be
4 changed files with 50 additions and 37 deletions

View File

@@ -222,7 +222,8 @@ trait ModifiesPiggyBanks
// update the accounts
$factory = new PiggyBankFactory();
$factory->user = $this->user;
$factory->linkToAccountIds($piggyBank, $data['accounts']);
$factory->linkToAccountIds($piggyBank, $data['accounts'] ?? []);
// if the piggy bank is now smaller than the sum of the money saved,