fix workflow edit api

This commit is contained in:
jxxghp
2025-02-26 19:06:30 +08:00
parent 835e6e8891
commit 403d600db4
2 changed files with 5 additions and 2 deletions

View File

@@ -57,7 +57,10 @@ def update_workflow(workflow: schemas.Workflow,
"""
更新工作流
"""
Workflow.update(db, workflow)
wf = Workflow.get(db, workflow.id)
if not wf:
return schemas.Response(success=False, message="工作流不存在")
wf.update(db, workflow.dict())
return schemas.Response(success=True, message="更新成功")