mirror of
https://github.com/firefly-iii/firefly-iii.git
synced 2025-10-12 15:35:15 +00:00
Update configuration and fix some files.
This commit is contained in:
@@ -75,7 +75,7 @@ class AccountFactory
|
||||
app('log')->debug(sprintf('findOrCreate("%s", "%s")', $accountName, $accountType));
|
||||
|
||||
$type = $this->accountRepository->getAccountTypeByType($accountType);
|
||||
if (null === $type) {
|
||||
if (!$type instanceof AccountType) {
|
||||
throw new FireflyException(sprintf('Cannot find account type "%s"', $accountType));
|
||||
}
|
||||
$return = $this->user->accounts->where('account_type_id', $type->id)->where('name', $accountName)->first();
|
||||
@@ -111,7 +111,7 @@ class AccountFactory
|
||||
// account may exist already:
|
||||
$return = $this->find($data['name'], $type->type);
|
||||
|
||||
if (null !== $return) {
|
||||
if ($return instanceof Account) {
|
||||
return $return;
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user