diff --git a/keep/api/models/workflow.py b/keep/api/models/workflow.py index 26d28f2e1..6beb16c80 100644 --- a/keep/api/models/workflow.py +++ b/keep/api/models/workflow.py @@ -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 @@ -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")