Skip to content

Commit

Permalink
bugfixing upoming earnings
Browse files Browse the repository at this point in the history
  • Loading branch information
MuslemRahimi committed Dec 17, 2024
1 parent 2a81b3f commit 4a158f4
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions app/cron_dashboard.py
Original file line number Diff line number Diff line change
Expand Up @@ -142,10 +142,10 @@ async def get_upcoming_earnings(session, end_date, filter_today=True):
name = item['name']
time = item['time']
is_today = item['date'] == today
eps_prior = float(item['eps_prior']) if item['eps_prior'] != '' else 0
eps_est = float(item['eps_est']) if item['eps_est'] != '' else 0
revenue_est = float(item['revenue_est']) if item['revenue_est'] != '' else 0
revenue_prior = float(item['revenue_prior']) if item['revenue_prior'] != '' else 0
eps_prior = float(item['eps_prior']) if item['eps_prior'] != '' else None
eps_est = float(item['eps_est']) if item['eps_est'] != '' else None
revenue_est = float(item['revenue_est']) if item['revenue_est'] != '' else None
revenue_prior = float(item['revenue_prior']) if item['revenue_prior'] != '' else None

if symbol in stock_symbols and revenue_est is not None and revenue_prior is not None and eps_prior is not None and eps_est is not None:
df = pd.read_sql_query(query_template, con, params=(symbol,))
Expand Down

0 comments on commit 4a158f4

Please sign in to comment.