The personal finance app for everyone
Fix start date missing error in market data sync
Zach Gollwitzerb8903d0980e8
diff --git a/app/models/market_data_syncer.rb b/app/models/market_data_syncer.rbindex 70d60b75..5567ba31 100644--- a/app/models/market_data_syncer.rb+++ b/app/models/market_data_syncer.rb@@ -101,14 +101,14 @@ class MarketDataSyncerdef get_first_required_price_date(security)return default_start_date if snapshot?- Trade.with_entry.where(security: security).minimum(:date)+ Trade.with_entry.where(security: security).minimum(:date) || default_start_dateend# An approximation that grabs more than we likely need, but simplifies the logicdef get_first_required_exchange_rate_date(from_currency:)return default_start_date if snapshot?- Entry.where(currency: from_currency).minimum(:date)+ Entry.where(currency: from_currency).minimum(:date) || default_start_dateenddef default_start_date