From dfa93b2bd36dbd5b41e4663ea127262856fedc20 Mon Sep 17 00:00:00 2001 From: Mars Liu Date: Thu, 25 Nov 2021 16:23:05 +0800 Subject: [PATCH] fixed odd orders --- src/tree.py | 9 ++------- 1 file changed, 2 insertions(+), 7 deletions(-) diff --git a/src/tree.py b/src/tree.py index c11832b..77b2b50 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) -- GitLab