From aaf9d3805693c4593fd943def3d449c73d1b8b51 Mon Sep 17 00:00:00 2001 From: shangfangjian Date: Sun, 20 Sep 2026 21:33:32 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BF=AE=E5=A4=8D=E7=BB=9F=E8=AE=A1=E5=9B=9E?= =?UTF-8?q?=E5=A1=AB=20ExecutionOption=20=E9=94=99=E8=AF=AF?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit ingest_bzzoiro_event_stats 中 .options(select(Match.stats)) 用法错误: .options() 期望 loader option(如 selectinload),不能传 select() 对象。 → 改用 selectinload(Match.stats) 并补充 import。 Co-Authored-By: new-provider/LongCat-2.0 <> --- src/data/bzzoiro.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/data/bzzoiro.py b/src/data/bzzoiro.py index de88e06..1bd2d36 100644 --- a/src/data/bzzoiro.py +++ b/src/data/bzzoiro.py @@ -16,6 +16,7 @@ from collections.abc import Iterable from datetime import datetime, timedelta, timezone from sqlalchemy import select +from sqlalchemy.orm import selectinload import httpx @@ -585,7 +586,7 @@ async def ingest_bzzoiro_event_stats( stmt = ( select(Match) - .options(select(Match.stats)) + .options(selectinload(Match.stats)) .where(Match.match_status == "finished") .where(Match.source_event_id.is_not(None)) .where(Match.league_id.in_(league_ids))