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

fixed missed eid

上级 4ef1823a
...@@ -2,6 +2,6 @@ ...@@ -2,6 +2,6 @@
"type": "code_options", "type": "code_options",
"author": "lostrex", "author": "lostrex",
"source": "hashset.md", "source": "hashset.md",
"exercise_id": "", "exercise_id": "e5f555e0fd71468d8879035889e7fec6",
"notebook_enable": false "notebook_enable": false
} }
\ No newline at end of file
...@@ -327,7 +327,7 @@ class TreeWalker: ...@@ -327,7 +327,7 @@ class TreeWalker:
for e in config.get("export", []): for e in config.get("export", []):
full_name = os.path.join(section_path, e) full_name = os.path.join(section_path, e)
exercise = load_json(full_name) exercise = load_json(full_name)
if "exercise_id" not in exercise or exercise.get("exercise_id") in id_set: if not exercise.get("exercise_id") or exercise.get("exercise_id") in id_set:
eid = uuid.uuid4().hex eid = uuid.uuid4().hex
exercise["exercise_id"] = eid exercise["exercise_id"] = eid
dump_json(full_name, exercise, True, True) dump_json(full_name, exercise, True, True)
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册