mirror of
https://github.com/firefly-iii/firefly-iii.git
synced 2025-10-15 08:35:00 +00:00
Fix tests for account
This commit is contained in:
@@ -120,7 +120,13 @@ trait AccountServiceTrait
|
||||
if (null === $data['account_role']) {
|
||||
$data['account_role'] = $this->accountRepository->getMetaValue($account, 'account_role');
|
||||
}
|
||||
if ($account->accountType->type === AccountType::ASSET && isset($data['account_role']) && 'ccAsset' === $data['account_role']) {
|
||||
|
||||
// only asset account may have a role:
|
||||
if ($account->accountType->type !== AccountType::ASSET) {
|
||||
$data['account_role'] = '';
|
||||
}
|
||||
|
||||
if ($account->accountType->type === AccountType::ASSET && array_key_exists('account_role', $data) && 'ccAsset' === $data['account_role']) {
|
||||
$fields = $this->validCCFields; // @codeCoverageIgnore
|
||||
}
|
||||
/** @var AccountMetaFactory $factory */
|
||||
|
Reference in New Issue
Block a user