fix: assign_teams seed에 current_stage 포함 (디스크 JSON 완전성)
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
This commit is contained in:
@@ -349,7 +349,7 @@ def main():
|
||||
data = json.loads(data_path.read_text(encoding="utf-8"))
|
||||
else:
|
||||
data = {
|
||||
"settings": {"voting_open": True},
|
||||
"settings": {"voting_open": True, "current_stage": "intro"},
|
||||
"titles": {},
|
||||
"tie_breaks": {},
|
||||
"votes": [],
|
||||
@@ -358,12 +358,15 @@ def main():
|
||||
ensure_topics_seeded(data) # 신규
|
||||
# 누락 키 보강
|
||||
for k, v in [
|
||||
("settings", {"voting_open": True}),
|
||||
("settings", {"voting_open": True, "current_stage": "intro"}),
|
||||
("titles", {}),
|
||||
("tie_breaks", {}),
|
||||
("votes", []),
|
||||
]:
|
||||
data.setdefault(k, v)
|
||||
# 기존 settings에 누락된 nested 키 보강
|
||||
data["settings"].setdefault("voting_open", True)
|
||||
data["settings"].setdefault("current_stage", "intro")
|
||||
|
||||
data_path.write_text(
|
||||
json.dumps(data, ensure_ascii=False, indent=2),
|
||||
|
||||
Reference in New Issue
Block a user