From a76aa340d5db2c8c9463287ec97572be51a46708 Mon Sep 17 00:00:00 2001 From: "sentry[bot]" <39604003+sentry[bot]@users.noreply.github.com> Date: Sun, 5 Apr 2026 09:25:18 +0200 Subject: [PATCH] fix: prevent NoMethodError in foreign_account? when account family is nil (#1376) Co-authored-by: sentry[bot] <39604003+sentry[bot]@users.noreply.github.com> --- app/models/account/market_data_importer.rb | 1 + 1 file changed, 1 insertion(+) diff --git a/app/models/account/market_data_importer.rb b/app/models/account/market_data_importer.rb index 169435b34..c6caf7980 100644 --- a/app/models/account/market_data_importer.rb +++ b/app/models/account/market_data_importer.rb @@ -90,6 +90,7 @@ class Account::MarketDataImporter end def foreign_account? + return false if account.family.nil? account.currency != account.family.currency end end