feat(M01): POST /api/m01/logic/flow — 저장 안 한 고친 줄(옛 편집기)을 흐름으로 변환해 돌려줌(쓰기 없음)
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01KmELpdXFDRZHhfbGuRhSmL
This commit is contained in:
@@ -262,10 +262,13 @@ def _row(file: str, key: str) -> dict:
|
||||
return hit
|
||||
|
||||
|
||||
def get_flow(file: str, key: str) -> dict:
|
||||
"""{flow, converted, notes} — 흐름이 있으면 그대로 · 없으면 변환(파일은 안 바뀜)."""
|
||||
row = _row(file, key)
|
||||
if isinstance(row.get(FLOW), dict):
|
||||
def get_flow(file: str, key: str, draft: dict | None = None) -> dict:
|
||||
"""{flow, converted, notes} — 흐름이 있으면 그대로 · 없으면 변환(파일은 안 바뀜)
|
||||
· draft = 저장 안 한 고친 줄(옛 편집기) — 늘 그 줄 그대로 변환(쓰기 없음)."""
|
||||
row = _row(file, key) if draft is None else store._dec({**draft, "키": draft.get("키") or key})
|
||||
if draft is not None:
|
||||
row.pop(FLOW, None)
|
||||
elif isinstance(row.get(FLOW), dict):
|
||||
return {"flow": {**row[FLOW], "key": key}, "converted": False, "notes": []}
|
||||
try:
|
||||
convert = importlib.import_module(CONVERT).convert
|
||||
|
||||
Reference in New Issue
Block a user