From 2c30e18c9b28e7e123208c77f3fdd72662292bae Mon Sep 17 00:00:00 2001 From: Zach Gollwitzer Date: Tue, 7 Jan 2025 11:31:44 -0500 Subject: [PATCH] Fix enrichment setting --- app/models/account/syncer.rb | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/app/models/account/syncer.rb b/app/models/account/syncer.rb index 27cd139d..7817a308 100644 --- a/app/models/account/syncer.rb +++ b/app/models/account/syncer.rb @@ -13,8 +13,8 @@ class Account::Syncer update_account_info(balances, holdings) unless account.plaid_account_id.present? convert_records_to_family_currency(balances, holdings) unless account.currency == account.family.currency - # Enrich if user opted in or if we're syncing transactions from a Plaid account - if account.family.data_enrichment_enabled? || account.plaid_account_id.present? + # Enrich if user opted in or if we're syncing transactions from a Plaid account on the hosted app + if account.family.data_enrichment_enabled? || (account.plaid_account_id.present? && Rails.application.config.app_mode.hosted?) account.enrich_data_later else Rails.logger.info("Data enrichment is disabled, skipping enrichment for account #{account.id}")