mirror of
https://github.com/firefly-iii/firefly-iii.git
synced 2025-10-26 05:26:17 +00:00
Refactor repository and some commands for upgrading
This commit is contained in:
@@ -52,14 +52,13 @@ class CurrencyUpdateService
|
||||
$currency->name = e($data['name']);
|
||||
}
|
||||
|
||||
if (array_key_exists('enabled', $data) && is_bool($data['enabled'])) {
|
||||
$currency->enabled = (bool)$data['enabled'];
|
||||
}
|
||||
$currency->enabled = false;
|
||||
|
||||
if (array_key_exists('decimal_places', $data) && is_int($data['decimal_places'])) {
|
||||
$currency->decimal_places = (int)$data['decimal_places'];
|
||||
}
|
||||
|
||||
unset($currency->userEnabled);
|
||||
unset($currency->userDefault);
|
||||
$currency->save();
|
||||
|
||||
return $currency;
|
||||
|
||||
Reference in New Issue
Block a user