Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 6 additions & 2 deletions keep/api/routes/workflows.py
Original file line number Diff line number Diff line change
Expand Up @@ -1184,9 +1184,13 @@ def toggle_workflow_state(
if workflow.provisioned:
raise HTTPException(403, detail="Cannot modify a provisioned workflow")

# Toggle the disabled state
# TODO: update workflow_raw
# Toggle the disabled state and sync workflow_raw YAML
workflow.is_disabled = not workflow.is_disabled

workflow_raw_data = cyaml.safe_load(workflow.workflow_raw)
workflow_raw_data["disabled"] = workflow.is_disabled
workflow.workflow_raw = cyaml.dump(workflow_raw_data, width=99999)

workflow.last_updated = datetime.datetime.now()

session.add(workflow)
Expand Down
Loading