diff --git a/keep/api/models/alert.py b/keep/api/models/alert.py index 7fc180a83..ef4b266e8 100644 --- a/keep/api/models/alert.py +++ b/keep/api/models/alert.py @@ -449,7 +449,10 @@ class IncidentDto(IncidentDtoIn): incident_type: str | None incident_application: str | None - resolve_on: str = ResolveOn.ALL.value + resolve_on: str = Field( + default=ResolveOn.ALL.value, + description="Resolution strategy for the incident", + ) _tenant_id: str = PrivateAttr() _alerts: Optional[List[AlertDto]] = PrivateAttr(default=None) @@ -514,6 +517,10 @@ def from_db_incident(cls, db_incident: "Incident"): else db_incident.severity ) + # some default value for resolve_on + if not db_incident.resolve_on: + db_incident.resolve_on = ResolveOn.ALL.value + dto = cls( id=db_incident.id, user_generated_name=db_incident.user_generated_name, diff --git a/pyproject.toml b/pyproject.toml index 15b98380e..537234775 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -1,6 +1,6 @@ [tool.poetry] name = "keep" -version = "0.34.4" +version = "0.34.5" description = "Alerting. for developers, by developers." authors = ["Keep Alerting LTD"] packages = [{include = "keep"}]