diff --git a/backend/api/competitors.py b/backend/api/competitors.py index 09b176d..1afa637 100644 --- a/backend/api/competitors.py +++ b/backend/api/competitors.py @@ -1192,8 +1192,12 @@ async def get_schedule_info( # Calculate what today's schedule would look like from jobs.scrape_booking_rates import get_high_priority_dates, get_medium_priority_dates, get_low_priority_dates high = get_high_priority_dates() - medium = get_medium_priority_dates() - low = get_low_priority_dates() + sync_db = SyncSessionLocal() + try: + medium = get_medium_priority_dates(sync_db) + low = get_low_priority_dates(sync_db) + finally: + sync_db.close() today = date.today() weekday_name = today.strftime('%A')