From 60a5ddf6d4ab504df1f91228d869eb82ffffe115 Mon Sep 17 00:00:00 2001 From: hahwu <31872165+hahwu@users.noreply.github.com> Date: Thu, 12 Feb 2026 09:46:33 +0800 Subject: [PATCH] =?UTF-8?q?=E8=A7=A3=E6=9E=90=E8=84=9A=E6=9C=AC=E4=BC=98?= =?UTF-8?q?=E5=8C=96?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- tool/cfg/tool_cfg_json.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/tool/cfg/tool_cfg_json.py b/tool/cfg/tool_cfg_json.py index cfef59f0..c29c9e97 100644 --- a/tool/cfg/tool_cfg_json.py +++ b/tool/cfg/tool_cfg_json.py @@ -65,7 +65,8 @@ for file_cfg in file_list: for row in rows: row_dict = {fieldnames[i]: row[i] for i in range(len(fieldnames))} index = row_dict.pop(file_cfg["key"]) # 获取第一列的值作为索引并移除第一列 - + if index == "" or index is None: + continue # 跳过索引为空的行 # 仅保留需要的字段 fields_to_use = file_cfg.get("web_fields") if args.web and "web_fields" in file_cfg else file_cfg["fields"] row_dict = {field: row_dict[field] for field in fields_to_use if field in row_dict}