提交 c6004ab0 编写于 作者: M Mars Liu

fixed odd orders

上级 d155eb8b
...@@ -247,8 +247,12 @@ class TreeWalker: ...@@ -247,8 +247,12 @@ class TreeWalker:
return config return config
def ensure_node_id(self, config): def ensure_node_id(self, config):
if "node_id" not in config: if "node_id" not in config or \
config["node_id"] = self.gen_node_id() not config["node_id"].startswith(f"{self.tree}-") or \
config["node_id"] in id_set:
new_id = self.gen_node_id()
id_set.add(new_id)
config["node_id"] = new_id
return True, config return True, config
else: else:
return False, config return False, config
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册