From c51a6599ae078e552e0f9a06e00b472c3906464a Mon Sep 17 00:00:00 2001 From: MuslemRahimi Date: Thu, 12 Sep 2024 20:45:24 +0200 Subject: [PATCH] bugfixing --- app/cron_earnings.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/app/cron_earnings.py b/app/cron_earnings.py index bbd4d93..c79c25e 100644 --- a/app/cron_earnings.py +++ b/app/cron_earnings.py @@ -39,7 +39,7 @@ async def get_data(session, ticker): data = ujson.loads(await response.text())['earnings'] # Filter for future earnings - future_dates = [item for item in data if datetime.strptime(item["date"], "%Y-%m-%d") > today] + future_dates = [item for item in data if datetime.strptime(item["date"], "%Y-%m-%d") >= today] if future_dates: nearest_future = min(future_dates, key=lambda x: datetime.strptime(x["date"], "%Y-%m-%d")) try: