mirror of
https://github.com/firefly-iii/firefly-iii.git
synced 2025-10-15 16:57:09 +00:00
Update validators so they can handle one field at a time.
This commit is contained in:
@@ -79,9 +79,9 @@ class AccountUpdateService
|
||||
$account = $this->updateAccountOrder($account, $data);
|
||||
|
||||
// find currency, or use default currency instead.
|
||||
if (isset($data['currency_id']) && (null !== $data['currency_id'] || null !== $data['currency_code'])) {
|
||||
if (array_key_exists('currency_id', $data) || array_key_exists('currency_code', $data)) {
|
||||
$currency = $this->getCurrency((int)($data['currency_id'] ?? null), (string)($data['currency_code'] ?? null));
|
||||
unset($data['currency_code']);
|
||||
unset($data['currency_code'], $data['currency_id']);
|
||||
$data['currency_id'] = $currency->id;
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user