mirror of
https://github.com/firefly-iii/firefly-iii.git
synced 2025-10-12 23:45:10 +00:00
Fix #3493
This commit is contained in:
@@ -577,6 +577,7 @@ class CurrencyController extends Controller
|
||||
{
|
||||
$manager = $this->getManager();
|
||||
$currency = app('amount')->getDefaultCurrencyByUser(auth()->user());
|
||||
$this->parameters->set('defaultCurrency', $currency);
|
||||
|
||||
/** @var CurrencyTransformer $transformer */
|
||||
$transformer = app(CurrencyTransformer::class);
|
||||
|
@@ -55,7 +55,7 @@ class CurrencyTransformer extends AbstractTransformer
|
||||
$isDefault = false;
|
||||
$defaultCurrency = $this->parameters->get('defaultCurrency');
|
||||
if (null !== $defaultCurrency) {
|
||||
$isDefault = $defaultCurrency->id === $currency->id;
|
||||
$isDefault = (int) $defaultCurrency->id === (int) $currency->id;
|
||||
}
|
||||
$data = [
|
||||
'id' => (int)$currency->id,
|
||||
|
Reference in New Issue
Block a user