Skip to content

Commit

Permalink
fix: workflow interval can be None (keephq#1904)
Browse files Browse the repository at this point in the history
  • Loading branch information
talboren authored Sep 11, 2024
1 parent 1f4eba8 commit 9d09a76
Showing 1 changed file with 9 additions and 2 deletions.
11 changes: 9 additions & 2 deletions keep/api/models/workflow.py
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ class WorkflowDTO(BaseModel):
created_by: str
creation_time: datetime
triggers: List[dict] = None
interval: int
interval: int | None = None
disabled: bool = False
last_execution_time: datetime = None
last_execution_status: str = None
Expand Down Expand Up @@ -70,7 +70,14 @@ def manipulate_raw(cls, raw, values):
ordered_raw["disabled"] = d.get("disabled")
ordered_raw["triggers"] = d.get("triggers")
for key, val in d.items():
if key not in ["id", "description", "disabled", "triggers", "steps", "actions"]:
if key not in [
"id",
"description",
"disabled",
"triggers",
"steps",
"actions",
]:
ordered_raw[key] = val
# than steps and actions
ordered_raw["steps"] = d.get("steps")
Expand Down

0 comments on commit 9d09a76

Please sign in to comment.