fix: assign frozen flag from group to node correctly (#2867)

* fix: remove unnecessary code related to vertex parent_node_id in Graph class

* fix: update node["frozen"] assignment to node["data"]["node"]["frozen"] in add_frozen function
This commit is contained in:
Gabriel Luiz Freitas Almeida 2024-07-22 10:04:38 -03:00 committed by GitHub
commit 724f54067f
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
2 changed files with 2 additions and 3 deletions

View file

@ -869,8 +869,7 @@ class Graph:
self.run_manager.add_to_vertices_being_run(vertex_id)
try:
params = ""
parent_vertex = self.get_vertex(vertex.parent_node_id) if vertex.parent_node_id else None
if vertex.frozen or (parent_vertex and parent_vertex.frozen):
if vertex.frozen:
# Check the cache for the vertex
cached_result = await chat_service.get_cache(key=vertex.id)
if isinstance(cached_result, CacheMiss):

View file

@ -42,7 +42,7 @@ def add_frozen(nodes, frozen):
This function receives a list of nodes and adds a frozen to each node.
"""
for node in nodes:
node["frozen"] = frozen
node["data"]["node"]["frozen"] = frozen
def ungroup_node(group_node_data, base_flow):