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 intermittent failure of `test_agent_execution` (#9210)
Reinier van der Leer96fae5a5c8a9
diff --git a/autogpt_platform/backend/backend/data/graph.py b/autogpt_platform/backend/backend/data/graph.pyindex 7dd99a75e5..77108f8d19 100644--- a/autogpt_platform/backend/backend/data/graph.py+++ b/autogpt_platform/backend/backend/data/graph.py@@ -629,25 +629,20 @@ async def __create_graph(tx, graph: Graph, user_id: str):"isTemplate": graph.is_template,"isActive": graph.is_active,"userId": user_id,+ "AgentNodes": {+ "create": [+ {+ "id": node.id,+ "agentBlockId": node.block_id,+ "constantInput": json.dumps(node.input_default),+ "metadata": json.dumps(node.metadata),+ }+ for node in graph.nodes+ ]+ },})- await asyncio.gather(- *[- AgentNode.prisma(tx).create(- {- "id": node.id,- "agentBlockId": node.block_id,- "agentGraphId": graph.id,- "agentGraphVersion": graph.version,- "constantInput": json.dumps(node.input_default),- "metadata": json.dumps(node.metadata),- }- )- for node in graph.nodes- ]- )-await asyncio.gather(*[AgentNodeLink.prisma(tx).create(