fix workflow count

This commit is contained in:
jxxghp
2025-03-15 10:16:25 +08:00
parent f5832d6a25
commit a0a11842cb
3 changed files with 5 additions and 5 deletions
+2 -2
View File
@@ -83,12 +83,12 @@ class Workflow(Base):
@staticmethod
@db_update
def reset(db, wid: int):
def reset(db, wid: int, reset_count: bool = False):
db.query(Workflow).filter(Workflow.id == wid).update({
"state": 'W',
"result": None,
"current_action": None,
"run_count": 0,
"run_count": 0 if reset_count else Workflow.run_count,
})
return True