From ee16888317cd5aa539dfca0b9f8e06b989134b7b Mon Sep 17 00:00:00 2001 From: James Cole Date: Sun, 22 Mar 2026 06:41:55 +0100 Subject: [PATCH] Catch null pointer. --- .../Internal/Recalculate/PrimaryAmountRecalculationService.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/app/Services/Internal/Recalculate/PrimaryAmountRecalculationService.php b/app/Services/Internal/Recalculate/PrimaryAmountRecalculationService.php index 1adc513a8e..7950e24b5c 100644 --- a/app/Services/Internal/Recalculate/PrimaryAmountRecalculationService.php +++ b/app/Services/Internal/Recalculate/PrimaryAmountRecalculationService.php @@ -202,7 +202,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));