From ead4cb54c89ecbb1497e90f4c9dd361a3b16f668 Mon Sep 17 00:00:00 2001 From: MuslemRahimi Date: Tue, 10 Dec 2024 11:19:54 +0100 Subject: [PATCH] bugfixing --- app/cron_earnings.py | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/app/cron_earnings.py b/app/cron_earnings.py index a5425b2..f476c8d 100644 --- a/app/cron_earnings.py +++ b/app/cron_earnings.py @@ -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,