mirror of
https://github.com/maybe-finance/maybe.git
synced 2025-07-18 20:59:39 +02:00
Fix provider guards for start price
This commit is contained in:
parent
a262a749fe
commit
ab5bce3462
2 changed files with 4 additions and 4 deletions
|
@ -18,8 +18,8 @@ class ExchangeRate::Importer
|
|||
return
|
||||
end
|
||||
|
||||
if clear_cache && provider_rates.empty?
|
||||
Rails.logger.warn("Could not clear cache for #{from} to #{to} between #{start_date} and #{end_date} because provider returned no rates")
|
||||
if provider_rates.empty?
|
||||
Rails.logger.warn("Could not fetch rates for #{from} to #{to} between #{start_date} and #{end_date} because provider returned no rates")
|
||||
return
|
||||
end
|
||||
|
||||
|
|
|
@ -18,8 +18,8 @@ class Security::Price::Importer
|
|||
return 0
|
||||
end
|
||||
|
||||
if clear_cache && provider_prices.empty?
|
||||
Rails.logger.warn("Could not clear cache for #{security.ticker} between #{start_date} and #{end_date} because provider returned no prices")
|
||||
if provider_prices.empty?
|
||||
Rails.logger.warn("Could not fetch prices for #{security.ticker} between #{start_date} and #{end_date} because provider returned no prices")
|
||||
return 0
|
||||
end
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue