mirror of
https://github.com/firefly-iii/firefly-iii.git
synced 2026-01-09 20:11:22 +00:00
Small optimizations.
This commit is contained in:
@@ -122,6 +122,8 @@ class CurrencyController extends BaseController
|
||||
}
|
||||
|
||||
/**
|
||||
* @SuppressWarnings("CyclomaticComplexity") // It's exactly 5. So I don't mind.
|
||||
*
|
||||
* @return $this|\Illuminate\Http\RedirectResponse
|
||||
*/
|
||||
public function store()
|
||||
@@ -173,10 +175,11 @@ class CurrencyController extends BaseController
|
||||
Session::flash('errors', $messages['errors']);
|
||||
if ($messages['errors']->count() > 0) {
|
||||
Session::flash('error', 'Could not update currency: ' . $messages['errors']->first());
|
||||
return Redirect::route('currency.edit', $currency->id)->withInput();
|
||||
}
|
||||
|
||||
// return to update screen:
|
||||
if ($data['post_submit_action'] == 'validate_only' || $messages['errors']->count() > 0) {
|
||||
if ($data['post_submit_action'] == 'validate_only') {
|
||||
return Redirect::route('currency.edit', $currency->id)->withInput();
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user