Skip to content

Commit

Permalink
bugfixing
Browse files Browse the repository at this point in the history
  • Loading branch information
MuslemRahimi committed Dec 10, 2024
1 parent 9ccbfc0 commit ead4cb5
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions app/cron_earnings.py
Original file line number Diff line number Diff line change
Expand Up @@ -62,10 +62,10 @@ async def get_data(session, ticker):
symbol = nearest_future['ticker']
time = nearest_future['time']
date = nearest_future['date']
eps_prior = float(nearest_future['eps_prior']) if nearest_future['eps_prior'] else 0
eps_est = float(nearest_future['eps_est']) if nearest_future['eps_est'] else 0
revenue_est = float(nearest_future['revenue_est']) if nearest_future['revenue_est'] else 0
revenue_prior = float(nearest_future['revenue_prior']) if nearest_future['revenue_prior'] else 0
eps_prior = float(nearest_future['eps_prior']) if nearest_future['eps_prior'] else None
eps_est = float(nearest_future['eps_est']) if nearest_future['eps_est'] else None
revenue_est = float(nearest_future['revenue_est']) if nearest_future['revenue_est'] else None
revenue_prior = float(nearest_future['revenue_prior']) if nearest_future['revenue_prior'] else None
if revenue_est is not None and revenue_prior is not None and eps_prior is not None and eps_est is not None:
res_list = {
'date': date,
Expand Down

0 comments on commit ead4cb5

Please sign in to comment.