From bc57e48bd82ec8cf61fd628c2fde8456142c8704 Mon Sep 17 00:00:00 2001 From: Gabriel Luiz Freitas Almeida Date: Thu, 3 Aug 2023 14:29:31 -0300 Subject: [PATCH] =?UTF-8?q?=F0=9F=90=9B=20fix(base.py):=20skip=20values=20?= =?UTF-8?q?with=20show=20=3D=3D=20False=20and=20key=20!=3D=20"code"=20when?= =?UTF-8?q?=20iterating=20over=20template=5Fdict=20to=20improve=20filterin?= =?UTF-8?q?g=20logic?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/backend/langflow/graph/vertex/base.py | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/src/backend/langflow/graph/vertex/base.py b/src/backend/langflow/graph/vertex/base.py index 2c749b85f..57a890562 100644 --- a/src/backend/langflow/graph/vertex/base.py +++ b/src/backend/langflow/graph/vertex/base.py @@ -100,7 +100,9 @@ class Vertex: params[param_key] = edge.source for key, value in template_dict.items(): - if key == "_type" or not value.get("show"): + # Skip _type and any value that has show == False and is not code + # If we don't want to show code but we want to use it + if key == "_type" or (not value.get("show") and key != "code"): continue # If the type is not transformable to a python base class # then we need to get the edge that connects to this node