main
Deploy Iddaai Backend / build-and-deploy (push) Successful in 29s

This commit is contained in:
2026-05-04 18:00:40 +03:00
parent 145a8b336b
commit 27e96da31d
22 changed files with 571 additions and 169 deletions
@@ -964,13 +964,13 @@ class SingleMatchOrchestrator:
return None
# ── Pre-Match Simulation Mode ────────────────────────────
# For finished (FT/postGame) matches, strip live scores so the
# entire pipeline treats them as if they haven't kicked off yet.
# _is_live_match already returns False for FT, but this adds
# defense-in-depth against any code path that reads scores directly.
# Force all matches (live and finished) into pre-match state so the
# engine purely predicts based on pre-match odds and context, ignoring
# current live scores and preventing live state penalties.
_status_upper = str(data.status or "").upper()
_state_upper = str(data.state or "").upper()
if _status_upper in {"FT", "FINISHED"} or _state_upper in {"POSTGAME", "POST_GAME"}:
if _status_upper not in {"NS", "POSTPONED", "CANC", "ABD"}:
data.status = "NS"
data.state = "preGame"
data.current_score_home = None
data.current_score_away = None