Use different method for finding objects.

This commit is contained in:
James Cole
2018-02-28 20:23:45 +01:00
parent fdd2dedfc6
commit 54ba18975a
10 changed files with 36 additions and 38 deletions

View File

@@ -85,9 +85,9 @@ class NewUserController extends Controller
$this->createSavingsAccount($request, $repository);
// also store currency preference from input:
$currency = $currencyRepository->find(intval($request->input('amount_currency_id_bank_balance')));
$currency = $currencyRepository->findNull(intval($request->input('amount_currency_id_bank_balance')));
if (null !== $currency->id) {
if (null !== $currency) {
// store currency preference:
Preferences::set('currencyPreference', $currency->code);
Preferences::mark();