Fix auto-settle for non-Group-A: map results by TLA, not full name
_results_football_data resolved team codes via code_for(full name), which only covered Group A teams, so FINISHED matches in other groups (e.g. Canada vs Bosnia-Herzegovina) were silently dropped and never settled. Use tla -> code_for_tla (same as schedule ingestion; covers all 48), with full-name fallback. Verified: source FINISHED 2 -> 3, CAN-BIH settles 1-1. Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>develop
parent
1d406f6a4e
commit
c77d014a01
|
|
@ -221,8 +221,12 @@ async def _results_football_data() -> list[dict]:
|
||||||
for m in data.get("matches", []):
|
for m in data.get("matches", []):
|
||||||
if m.get("status") != "FINISHED":
|
if m.get("status") != "FINISHED":
|
||||||
continue
|
continue
|
||||||
a = code_for((m.get("homeTeam") or {}).get("name", "") or "")
|
ht = m.get("homeTeam") or {}
|
||||||
b = code_for((m.get("awayTeam") or {}).get("name", "") or "")
|
at = m.get("awayTeam") or {}
|
||||||
|
# 일정 수집과 동일하게 tla(3글자) → 코드. 풀네임 매핑(code_for)은 일부 팀만
|
||||||
|
# 커버해 누락이 생기므로 tla 우선, 없을 때만 풀네임 폴백.
|
||||||
|
a = code_for_tla(ht.get("tla") or "") or code_for(ht.get("name") or "")
|
||||||
|
b = code_for_tla(at.get("tla") or "") or code_for(at.get("name") or "")
|
||||||
if not a or not b:
|
if not a or not b:
|
||||||
continue
|
continue
|
||||||
ft = ((m.get("score") or {}).get("fullTime") or {})
|
ft = ((m.get("score") or {}).get("fullTime") or {})
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue