Refactor findNull to find

This commit is contained in:
James Cole
2021-06-30 06:17:38 +02:00
parent b7ae5eda35
commit 70da5917c9
68 changed files with 120 additions and 273 deletions

View File

@@ -131,7 +131,7 @@ class BudgetLimitController extends Controller
Log::debug('Going to store new budget-limit.', $request->all());
// first search for existing one and update it if necessary.
$currency = $this->currencyRepos->find((int)$request->get('transaction_currency_id'));
$budget = $this->repository->findNull((int)$request->get('budget_id'));
$budget = $this->repository->find((int)$request->get('budget_id'));
if (null === $currency || null === $budget) {
throw new FireflyException('No valid currency or budget.');
}