fix: step3 _normalize_rule 将 table source 的 null row 转为 0 - Closes #73
CI / test (pull_request) Successful in 8s
CI / test (pull_request) Successful in 8s
LLM 输出 table source 时 row 字段可能为 null,导致 Layer A schema 失败。 Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
This commit is contained in:
@@ -206,7 +206,12 @@ def _normalize_rule(rule: dict) -> dict:
|
||||
if stype and stype not in valid_types:
|
||||
src["type"] = "text"
|
||||
stype = "text"
|
||||
if stype in ("table", "text"):
|
||||
if stype == "table":
|
||||
if not src.get("section"):
|
||||
src["section"] = default_section
|
||||
if src.get("row") is None:
|
||||
src["row"] = 0
|
||||
elif stype == "text":
|
||||
if not src.get("section"):
|
||||
src["section"] = default_section
|
||||
else:
|
||||
|
||||
Reference in New Issue
Block a user