Skip to content

Commit 7e91e64

Browse files
fix(i18n): revert node_copy rename back to translated_node in translate_flow_notes
The rename was unnecessary — release-1.10.0 already used translated_node (not reassigning the loop variable node), so ruff PLW2901 doesn't apply.
1 parent 952a211 commit 7e91e64

1 file changed

Lines changed: 4 additions & 4 deletions

File tree

  • src/backend/base/langflow/utils

src/backend/base/langflow/utils/i18n.py

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -131,10 +131,10 @@ def translate_flow_notes(nodes: list[dict], locale: str) -> list[dict]:
131131
if node.get("type") == "noteNode":
132132
i18n_key = node.get("data", {}).get("node", {}).get("i18n_key")
133133
if i18n_key:
134-
node_copy = copy.deepcopy(node)
135-
description = node_copy["data"]["node"].get("description", "")
136-
node_copy["data"]["node"]["description"] = translate(i18n_key, locale, description)
137-
result.append(node_copy)
134+
translated_node = copy.deepcopy(node)
135+
description = translated_node["data"]["node"].get("description", "")
136+
translated_node["data"]["node"]["description"] = translate(i18n_key, locale, description)
137+
result.append(translated_node)
138138
continue
139139
result.append(node)
140140
return result

0 commit comments

Comments
 (0)