fix: 终审修复——test_case_id 格式校验、modify 空变更报错、异常兜底与文档补充
Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
This commit is contained in:
@@ -324,6 +324,8 @@ def build_display(init_sql, ref_sql, mode, *, memory_limit_mb=64):
|
||||
_execute_trusted(conn, ref_sql, time.monotonic() + trusted_limit_s, "标准答案执行失败")
|
||||
after = _dump_tables(conn)
|
||||
changed = {name for name in set(before) | set(after) if before.get(name) != after.get(name)}
|
||||
if not changed:
|
||||
raise SQLCaseError(JudgeStatus.SYSTEM_ERROR, "标准答案未修改任何表数据,请检查题目配置")
|
||||
changed_tables = _dump_display_tables(conn, only=changed)
|
||||
# 被标准答案 DROP 的表已不在库中,用初始展示数据补齐条目(前端据 dropped 提示“表已删除”)
|
||||
existing = {t["name"] for t in changed_tables}
|
||||
|
||||
Reference in New Issue
Block a user