fix: MatchStats 主键是 match_id 非 id

scheduler._run_checks 误用 MatchStats.id(MatchStats 无此列,主键为 match_id),
导致数据质量检查定时任务抛 AttributeError。修正为 MatchStats.match_id.is_(None)。
This commit is contained in:
shangfangjian
2026-09-22 10:18:00 +08:00
parent b749b1c621
commit 28ecf85da8
+1 -1
View File
@@ -144,7 +144,7 @@ class DataQualityScheduler:
.select_from(Match)
.outerjoin(MatchStats, Match.id == MatchStats.match_id)
.where(Match.match_status == "finished")
.where(MatchStats.id.is_(None))
.where(MatchStats.match_id.is_(None))
)
).scalar() or 0