修复统计回填 ExecutionOption 错误
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 <<EMAIL>>
This commit is contained in:
co-authored by
new-provider/LongCat-2.0 <
parent
fb27f6e2d2
commit
aaf9d38056
+2
-1
@@ -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))
|
||||
|
||||
Reference in New Issue
Block a user