mirror of
https://github.com/firefly-iii/firefly-iii.git
synced 2025-10-12 15:35:15 +00:00
Fixes #694
This commit is contained in:
@@ -181,11 +181,17 @@ class ImportBudget
|
||||
Log::debug('Finding a mapped budget based on', $array);
|
||||
|
||||
$search = intval($array['mapped']);
|
||||
$account = $this->repository->find($search);
|
||||
$budget = $this->repository->find($search);
|
||||
|
||||
Log::debug(sprintf('Found budget! #%d ("%s"). Return it', $account->id, $account->name));
|
||||
if (is_null($budget->id)) {
|
||||
Log::error(sprintf('There is no budget with id #%d. Invalid mapping will be ignored!', $search));
|
||||
|
||||
return $account;
|
||||
return new Budget;
|
||||
}
|
||||
|
||||
Log::debug(sprintf('Found budget! #%d ("%s"). Return it', $budget->id, $budget->name));
|
||||
|
||||
return $budget;
|
||||
}
|
||||
|
||||
/**
|
||||
|
Reference in New Issue
Block a user