mirror of
https://github.com/firefly-iii/firefly-iii.git
synced 2025-09-29 18:20:01 +00:00
Refactor findNull to find
This commit is contained in:
@@ -96,7 +96,7 @@ trait JournalServiceTrait
|
||||
$search = null;
|
||||
// first attempt, find by ID.
|
||||
if (null !== $data['id']) {
|
||||
$search = $this->accountRepository->findNull((int) $data['id']);
|
||||
$search = $this->accountRepository->find((int) $data['id']);
|
||||
if (null !== $search && in_array($search->accountType->type, $types, true)) {
|
||||
Log::debug(
|
||||
sprintf('Found "account_id" object: #%d, "%s" of type %s', $search->id, $search->name, $search->accountType->type)
|
||||
|
@@ -196,7 +196,7 @@ trait RecurringTransactionTrait
|
||||
$repository->setUser($this->user);
|
||||
|
||||
// if user has submitted an account ID, search for it.
|
||||
$result = $repository->findNull((int)$accountId);
|
||||
$result = $repository->find((int)$accountId);
|
||||
if (null !== $result) {
|
||||
return $result;
|
||||
}
|
||||
|
Reference in New Issue
Block a user