Fix schedule-info 500: pass db session to medium/low priority date fns
get_medium_priority_dates and get_low_priority_dates both require a SyncSession argument; the endpoint was calling them without one, causing a TypeError → 500 on every load of the schedule card. Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
This commit is contained in:
parent
cab1a39503
commit
7d0b7d2d3b
1 changed files with 6 additions and 2 deletions
|
|
@ -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')
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue