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:
Deeman
2026-03-01 19:47:01 +01:00
parent a15c32d398
commit 0811b30cbd

View File

@@ -434,8 +434,10 @@ def _find_venues_with_upcoming_slots(
if not start_time_str: if not start_time_str:
continue continue
try: try:
# Parse "2026-02-24T17:00:00" format # start_time is "HH:MM:SS"; combine with resource's start_date
slot_start = datetime.fromisoformat(start_time_str).replace(tzinfo=UTC) 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: if window_start <= slot_start < window_end:
tenant_ids.add(tid) tenant_ids.add(tid)
break # found one upcoming slot, no need to check more break # found one upcoming slot, no need to check more