From c3ba459d1247a82014e8e9d9ffeb1bcd5b693aa6 Mon Sep 17 00:00:00 2001 From: Lucas Oliveira Date: Mon, 22 Sep 2025 17:59:51 -0300 Subject: [PATCH] fix edge not connecting on nudges flow --- src/services/flows_service.py | 15 +++++---------- 1 file changed, 5 insertions(+), 10 deletions(-) diff --git a/src/services/flows_service.py b/src/services/flows_service.py index b33fa0fb..4c3872ca 100644 --- a/src/services/flows_service.py +++ b/src/services/flows_service.py @@ -361,22 +361,17 @@ class FlowsService: flow_json_str = re.sub( re.escape(old_llm_id), new_llm_id, flow_json_str ) + if old_llm_text_id: + flow_json_str = re.sub( + re.escape(old_llm_text_id), new_llm_text_id, flow_json_str + ) + flow_json_str = re.sub( re.escape(old_llm_id.split("-")[0]), new_llm_id.split("-")[0], flow_json_str, ) - if old_llm_text_id: - flow_json_str = re.sub( - re.escape(old_llm_text_id), new_llm_text_id, flow_json_str - ) - flow_json_str = re.sub( - re.escape(old_llm_text_id.split("-")[0]), - new_llm_text_id.split("-")[0], - flow_json_str, - ) - # Convert back to JSON flow_data = json.loads(flow_json_str)