This commit is contained in:
James Cole
2017-07-10 19:52:31 +02:00
parent 780bec35bb
commit 9b6ccdd43a
6 changed files with 61 additions and 10 deletions

View File

@@ -209,6 +209,13 @@ class ImportCurrency
$search = intval($array['mapped']);
$currency = $this->repository->find($search);
if (is_null($currency->id)) {
Log::error(sprintf('There is no currency with id #%d. Invalid mapping will be ignored!', $search));
return new TransactionCurrency;
}
Log::debug(sprintf('Found currency! #%d ("%s"). Return it', $currency->id, $currency->name));
return $currency;