AutoGPT is the vision of accessible AI for everyone, to use and to build on. Our mission is to provide the tools, so that you can focus on what matters.
fix(backend): Fix stop graph response on already stopped graph
Zamil Majdy5ff6d2ca56b5
diff --git a/autogpt_platform/backend/backend/server/routers/v1.py b/autogpt_platform/backend/backend/server/routers/v1.pyindex 3029e1182c..2fb5e6a857 100644--- a/autogpt_platform/backend/backend/server/routers/v1.py+++ b/autogpt_platform/backend/backend/server/routers/v1.py@@ -669,17 +669,14 @@ async def execute_graph()async def stop_graph_run(graph_id: str, graph_exec_id: str, user_id: Annotated[str, Depends(get_user_id)]-) -> execution_db.GraphExecutionMeta:+) -> execution_db.GraphExecutionMeta | None:res = await _stop_graph_run(user_id=user_id,graph_id=graph_id,graph_exec_id=graph_exec_id,)if not res:- raise HTTPException(- status_code=HTTP_404_NOT_FOUND,- detail=f"Graph execution #{graph_exec_id} not found.",- )+ return Nonereturn res[0]