diff --git a/backend/app/services/schedule_fetch.py b/backend/app/services/schedule_fetch.py index a185e39..8a1b5a5 100644 --- a/backend/app/services/schedule_fetch.py +++ b/backend/app/services/schedule_fetch.py @@ -221,8 +221,12 @@ async def _results_football_data() -> list[dict]: for m in data.get("matches", []): if m.get("status") != "FINISHED": continue - a = code_for((m.get("homeTeam") or {}).get("name", "") or "") - b = code_for((m.get("awayTeam") or {}).get("name", "") or "") + ht = m.get("homeTeam") 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: continue ft = ((m.get("score") or {}).get("fullTime") or {})