fix(extract): recheck slot datetime parsing — was silently skipping all slots
start_time is "HH:MM:SS" (time only), not a full ISO datetime. Combining with resource's start_date to get "YYYY-MM-DDTHH:MM:SS" before parsing. The ValueError was silently caught on every slot → 0 venues found → recheck never actually ran since it was first deployed. Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
This commit is contained in:
@@ -434,8 +434,10 @@ def _find_venues_with_upcoming_slots(
|
||||
if not start_time_str:
|
||||
continue
|
||||
try:
|
||||
# Parse "2026-02-24T17:00:00" format
|
||||
slot_start = datetime.fromisoformat(start_time_str).replace(tzinfo=UTC)
|
||||
# start_time is "HH:MM:SS"; combine with resource's start_date
|
||||
start_date = resource.get("start_date", "")
|
||||
full_dt = f"{start_date}T{start_time_str}" if start_date else start_time_str
|
||||
slot_start = datetime.fromisoformat(full_dt).replace(tzinfo=UTC)
|
||||
if window_start <= slot_start < window_end:
|
||||
tenant_ids.add(tid)
|
||||
break # found one upcoming slot, no need to check more
|
||||
|
||||
Reference in New Issue
Block a user