Fix seeded workflow agent reference
This commit is contained in:
@@ -82,6 +82,13 @@ async def seed_database(db: AsyncSession) -> None:
|
|||||||
|
|
||||||
db.add_all([admin, role, *permissions, *menus, provider, model, agent, workflow, team, announcement])
|
db.add_all([admin, role, *permissions, *menus, provider, model, agent, workflow, team, announcement])
|
||||||
await db.flush()
|
await db.flush()
|
||||||
workflow.definition["nodes"][1]["data"]["agent_id"] = agent.id
|
workflow.definition = {
|
||||||
|
"nodes": [
|
||||||
|
{"id": "start", "type": "start", "data": {}},
|
||||||
|
{"id": "plan", "type": "agent", "data": {"agent_id": agent.id}},
|
||||||
|
{"id": "end", "type": "end", "data": {}},
|
||||||
|
],
|
||||||
|
"edges": [],
|
||||||
|
}
|
||||||
team.members = [{"agent_id": agent.id, "role": "planner"}, {"agent_id": agent.id, "role": "reviewer"}]
|
team.members = [{"agent_id": agent.id, "role": "planner"}, {"agent_id": agent.id, "role": "reviewer"}]
|
||||||
await db.commit()
|
await db.commit()
|
||||||
|
|||||||
Reference in New Issue
Block a user