Skip to content

Commit b596d3b

Browse files
committed
skip if empty
1 parent 3e24d07 commit b596d3b

File tree

1 file changed

+3
-0
lines changed

1 file changed

+3
-0
lines changed

scraper_service/shovel_tao_price/cmc_client.py

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -55,6 +55,9 @@ def get_price_by_time(timestamp):
5555

5656
if status_code == 200 and 'data' in data and 'quotes' in data['data']:
5757
logging.info("Successfully parsed response data")
58+
if not data['data']['quotes']:
59+
logging.info("No quotes data available, skipping")
60+
return None
5861
quote = data['data']['quotes'][0]
5962
usd_quote = quote['quote']['USD']
6063
price = usd_quote['price']

0 commit comments

Comments
 (0)