Skip to content

Firefly III: a personal finances manager

Fix #12029

Sander Dorigode7033ee63d9
diff --git a/app/Services/Internal/Recalculate/PrimaryAmountRecalculationService.php b/app/Services/Internal/Recalculate/PrimaryAmountRecalculationService.php
index 7950e24b5c..0a0e0d48a5 100644
--- a/app/Services/Internal/Recalculate/PrimaryAmountRecalculationService.php
+++ b/app/Services/Internal/Recalculate/PrimaryAmountRecalculationService.php
@@ -225,7 +225,7 @@ class PrimaryAmountRecalculationService
/** @var Account $account */
foreach ($set as $account) {
- $currencyId = (int) $account->accountMeta()->where('name', 'currency_id')->first()->data;
+ $currencyId = (int) $account->accountMeta()->where('name', 'currency_id')->first()?->data;
if ($groupCurrency->id === $currencyId) {
Log::debug(sprintf('Account "%s" is in group currency %s. Skip.', $account->name, $groupCurrency->code));