1
0
Fork 0
mirror of https://github.com/maybe-finance/maybe.git synced 2025-07-25 08:09:38 +02:00

Fix account sync when prices missing (#1127)

This commit is contained in:
Tony Vincent 2024-08-26 15:36:27 +02:00 committed by GitHub
parent 525439e44d
commit cf861ccff9
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
2 changed files with 62 additions and 1 deletions

View file

@ -16,7 +16,7 @@ class Issue::PricesMissing < Issue
missing_prices.each do |ticker, dates|
next unless issuable.owns_ticker?(ticker)
oldest_date = dates.min
oldest_date = dates.min.to_date
expected_price_count = (oldest_date..Date.current).count
prices = Security::Price.find_prices(ticker: ticker, start_date: oldest_date)
stale = false if prices.count < expected_price_count