diff --git a/src/tree.py b/src/tree.py index c11832b0f045c4893a51fcb81537ea70d34281f5..77b2b5078b36b822f36ec9bb2966633b02f7895d 100644 --- a/src/tree.py +++ b/src/tree.py @@ -70,10 +70,6 @@ def check_export(base, cfg): return flag -def gen_node_id(): - return "oceanbase-" + uuid.uuid4().hex - - class TreeWalker: def __init__(self, root, tree_name, title=None, log=None): self.name = tree_name @@ -307,8 +303,7 @@ class TreeWalker: config = self.ensure_section_config(section_path) for e in config.get("export", []): full_name = os.path.join(section_path, e) - logger.info(full_name) exercise = load_json(full_name) - if not exercise.get("exercise_id"): + if "exercise_id" not in exercise: exercise["exercise_id"] = uuid.uuid4().hex - dump_json(full_name, exercise, exist_ok=True, override=True) + dump_json(full_name, exercise, True, True)