mirror of
https://github.com/firefly-iii/firefly-iii.git
synced 2025-10-16 17:33:45 +00:00
Update some tests.
This commit is contained in:
@@ -359,7 +359,14 @@ class CurrencyController extends Controller
|
||||
}
|
||||
|
||||
$data['enabled'] = true;
|
||||
$currency = $this->repository->store($data);
|
||||
try {
|
||||
$currency = $this->repository->store($data);
|
||||
} catch (FireflyException $e) {
|
||||
Log::error($e->getMessage());
|
||||
Log::channel('audit')->info('Could not store (POST) currency without admin rights.', $data);
|
||||
$request->session()->flash('error', (string)trans('firefly.could_not_store_currency'));
|
||||
$currency = null;
|
||||
}
|
||||
$redirect = redirect($this->getPreviousUri('currencies.create.uri'));
|
||||
|
||||
if (null !== $currency) {
|
||||
@@ -373,10 +380,6 @@ class CurrencyController extends Controller
|
||||
// @codeCoverageIgnoreEnd
|
||||
}
|
||||
}
|
||||
if (null === $currency) {
|
||||
Log::channel('audit')->info('Could not store (POST) currency without admin rights.', $data);
|
||||
$request->session()->flash('error', (string)trans('firefly.could_not_store_currency'));
|
||||
}
|
||||
|
||||
return $redirect;
|
||||
}
|
||||
|
Reference in New Issue
Block a user