mirror of
https://github.com/firefly-iii/firefly-iii.git
synced 2025-10-12 15:35:15 +00:00
🤖 Auto commit for release 'develop' on 2025-09-08
This commit is contained in:
@@ -46,7 +46,7 @@ class TransactionCurrencyFactory
|
||||
$data['decimal_places'] = (int)$data['decimal_places'];
|
||||
// if the code already exists (deleted)
|
||||
// force delete it and then create the transaction:
|
||||
$count = TransactionCurrency::withTrashed()->whereCode($data['code'])->count();
|
||||
$count = TransactionCurrency::withTrashed()->whereCode($data['code'])->count();
|
||||
if (1 === $count) {
|
||||
$old = TransactionCurrency::withTrashed()->whereCode($data['code'])->first();
|
||||
$old->forceDelete();
|
||||
@@ -104,6 +104,7 @@ class TransactionCurrencyFactory
|
||||
}
|
||||
}
|
||||
Log::info(sprintf('Found currency #%d based on ID %d and code "%s".', $currency->id, $currencyId, $currencyCode));
|
||||
|
||||
return $currency;
|
||||
}
|
||||
}
|
||||
|
Reference in New Issue
Block a user