From 646799e902388f4ac143e533b4069a8b7e3d0303 Mon Sep 17 00:00:00 2001 From: umsangdon Date: Thu, 1 Oct 2026 19:52:52 +0900 Subject: [PATCH] =?UTF-8?q?fix(m02-df):=20=EB=8B=A4=EB=A5=B8=20=EB=A1=9C?= =?UTF-8?q?=EC=A7=81=20=EC=9E=85=EB=A0=A5=EC=9D=84=20=EB=B9=BC=EB=A9=B4=20?= =?UTF-8?q?=EB=B0=9B=EB=8A=94=20=EC=95=8C=EC=95=BD=EC=9C=BC=EB=A1=9C=20?= =?UTF-8?q?=EB=93=A4=EC=96=B4=EC=98=A4=EB=8D=98=20=EC=84=A0=EB=8F=84=20?= =?UTF-8?q?=EC=A7=80=EC=9B=80?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Co-Authored-By: Claude Sonnet 5.5 Claude-Session: https://claude.ai/code/session_019ACSGaHdLgnkEkoA4LDtMU --- M02_MasterTemplete/DataFlow/M02_DF_InputPanel_Build.ts | 4 ++-- resources/tester/test_m02_df_inputpanel_material.py | 7 +++++-- 2 files changed, 7 insertions(+), 4 deletions(-) diff --git a/M02_MasterTemplete/DataFlow/M02_DF_InputPanel_Build.ts b/M02_MasterTemplete/DataFlow/M02_DF_InputPanel_Build.ts index eb8fcc7bc..541fd358c 100644 --- a/M02_MasterTemplete/DataFlow/M02_DF_InputPanel_Build.ts +++ b/M02_MasterTemplete/DataFlow/M02_DF_InputPanel_Build.ts @@ -259,7 +259,7 @@ export function logicRefOf(key: string, other: CfLogic): CfLogicRef { }; } -/** 다른 로직 입력 넣기 · 빼기(null) — 빼면 변수 상태로 돌아가고 그 알약에서 나간 선도 지움 */ +/** 다른 로직 입력 넣기 · 빼기(null) — 빼면 변수 상태로 돌아가고 이 상자의 알약에 닿은 선은 모두 지움 */ export function setLogicInput(lg: CfLogic, id: string, ref: CfLogicRef | null): CfLogic { return { ...lg, @@ -270,7 +270,7 @@ export function setLogicInput(lg: CfLogic, id: string, ref: CfLogicRef | null): : { mode: "variable", elements: [], variables: [] }; return { ...b, input, unit: unitOfInput(input) }; }), - links: lg.links.filter((l) => l.from.box !== id), + links: lg.links.filter((l) => l.from.box !== id && l.to.box !== id), // 나가던 선 · 그 로직의 받는 알약으로 들어오던 선 모두 }; } diff --git a/resources/tester/test_m02_df_inputpanel_material.py b/resources/tester/test_m02_df_inputpanel_material.py index 43355562d..7f5b2657b 100644 --- a/resources/tester/test_m02_df_inputpanel_material.py +++ b/resources/tester/test_m02_df_inputpanel_material.py @@ -230,10 +230,13 @@ def test_다른_로직_상자는_출력_단위를_따르고_빼면_변수로_돌 assert box["unit"] == "㎥/시간" assert call("pillNames", box) == ["작업량"] lg["links"] = [ - {"id": "l1", "from": {"box": "b1", "name": "작업량"}, "to": {"box": "b2", "name": "x"}} + {"id": "l1", "from": {"box": "b1", "name": "작업량"}, "to": {"box": "b2", "name": "x"}}, + {"id": "l2", "from": {"box": "b2", "name": "관경"}, "to": {"box": "b1", "name": "q"}}, + {"id": "l3", "from": {"box": "b2", "name": "관경"}, "to": {"box": "b3", "name": "y"}}, ] back = call("setLogicInput", lg, "b1", None) - assert back["boxes"][0]["input"]["mode"] == "variable" and back["links"] == [] + assert back["boxes"][0]["input"]["mode"] == "variable" + assert [x["id"] for x in back["links"]] == ["l3"] assert call("reconcileUnit", lg, "b1") == lg # 다른 로직 상자 단위는 안 건드림