1
0
Fork 0
mirror of https://github.com/maybe-finance/maybe.git synced 2025-07-24 15:49:39 +02:00

provider: Ensure data provider exist before fetching for price. (#2045)

This commit is contained in:
Joseph Ho 2025-04-04 12:14:28 -04:00 committed by GitHub
parent 02bfa9f251
commit d86ccd36b6
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -71,6 +71,8 @@ module Security::Provided
return price if price.present?
# Make sure we have a data provider before fetching
return nil unless provider.present?
response = provider.fetch_security_price(self, date: date)
return nil unless response.success? # Provider error