fix(mls): odds 원소가 null 인 경기에서 프리뷰 갱신 전체가 죽던 문제

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
This commit is contained in:
jwkim 2026-08-14 14:50:59 +09:00
parent 00494e9e93
commit e1b85aeba6

View File

@ -188,7 +188,7 @@ async def _refresh_standings(db) -> bool:
# ── 프리뷰 (폼·시즌 성적·맞대결·머니라인) ──────────────────────
def _odds_of(comp: dict) -> dict | None:
"""scoreboard odds → {home, draw, away, provider} (없으면 None)."""
o = (comp.get("odds") or [{}])[0]
o = (comp.get("odds") or [{}])[0] or {} # odds: [null] 인 경기도 있음
ml = o.get("moneyline") or {}
def _pick(side: dict | None) -> str | None: