From cdbe2b040189cc267eb624da923ff048e63fd81c Mon Sep 17 00:00:00 2001 From: Gabriel Luiz Freitas Almeida Date: Sat, 10 Jun 2023 16:17:56 -0300 Subject: [PATCH] =?UTF-8?q?=F0=9F=90=9B=20fix(endpoints.py):=20change=20gr?= =?UTF-8?q?aph=5Fdata=20variable=20to=20use=20flow=5Fobj.data=20instead=20?= =?UTF-8?q?of=20flow=5Fobj.flow=20The=20graph=5Fdata=20variable=20was=20pr?= =?UTF-8?q?eviously=20assigned=20to=20flow=5Fobj.flow,=20which=20is=20inco?= =?UTF-8?q?rrect=20as=20the=20flow=5Fobj=20object=20does=20not=20have=20a?= =?UTF-8?q?=20flow=20attribute.=20Instead,=20the=20correct=20attribute=20t?= =?UTF-8?q?o=20use=20is=20flow=5Fobj.data.?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/backend/langflow/api/v1/endpoints.py | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/src/backend/langflow/api/v1/endpoints.py b/src/backend/langflow/api/v1/endpoints.py index 30be1766a..e38906fbf 100644 --- a/src/backend/langflow/api/v1/endpoints.py +++ b/src/backend/langflow/api/v1/endpoints.py @@ -33,9 +33,8 @@ async def get_load( flow_obj = session.get(Flow, flow_id) if flow_obj is None: raise ValueError(f"Flow {flow_id} not found") - graph_data = flow_obj.flow - data: dict = graph_data.get("data", {}) - response = process_graph_cached(data, predict_request.message) + graph_data = flow_obj.data + response = process_graph_cached(graph_data, predict_request.message) return PredictResponse( result=response.get("result", ""), intermediate_steps=response.get("thought", ""),