mirror of
https://github.com/firefly-iii/firefly-iii.git
synced 2025-10-12 15:35:15 +00:00
No longer have to submit mandatory fields to account end point. Just submit the field you wish to update, the rest will be untouched.
This commit is contained in:
@@ -95,12 +95,13 @@ trait AccountServiceTrait
|
||||
if ($account->accountType->type === AccountType::ASSET) {
|
||||
$fields = $this->validAssetFields;
|
||||
}
|
||||
if ($account->accountType->type === AccountType::ASSET && 'ccAsset' === $data['account_role']) {
|
||||
if ($account->accountType->type === AccountType::ASSET && isset($data['account_role']) && 'ccAsset' === $data['account_role']) {
|
||||
$fields = $this->validCCFields;
|
||||
}
|
||||
/** @var AccountMetaFactory $factory */
|
||||
$factory = app(AccountMetaFactory::class);
|
||||
foreach ($fields as $field) {
|
||||
|
||||
$factory->crud($account, $field, (string)($data[$field] ?? ''));
|
||||
}
|
||||
}
|
||||
|
Reference in New Issue
Block a user