From c3023826165ed88cfb3f2fc4b84b5b263da77f4e Mon Sep 17 00:00:00 2001 From: Shahar Glazner Date: Tue, 10 Dec 2024 11:15:18 +0200 Subject: [PATCH] feat(api): unique id (#2790) --- keep/api/routes/workflows.py | 2 +- keep/workflowmanager/workflowstore.py | 4 +++- pyproject.toml | 2 +- 3 files changed, 5 insertions(+), 3 deletions(-) diff --git a/keep/api/routes/workflows.py b/keep/api/routes/workflows.py index 362a14bb7..77771a32b 100644 --- a/keep/api/routes/workflows.py +++ b/keep/api/routes/workflows.py @@ -567,7 +567,7 @@ def get_workflow_executions_by_alert_fingerprint( @router.get("/{workflow_id}/runs", description="Get workflow executions by ID") -def get_workflow_by_id( +def get_workflow_runs_by_id( workflow_id: str, tab: int = 1, limit: int = 25, diff --git a/keep/workflowmanager/workflowstore.py b/keep/workflowmanager/workflowstore.py index 032dc8981..109a4d2b2 100644 --- a/keep/workflowmanager/workflowstore.py +++ b/keep/workflowmanager/workflowstore.py @@ -496,7 +496,9 @@ def get_workflow_meta_data( id=provider_data.id, installed=True, ) - providers_dto.append(provider_dto) + # add only if not already in the list + if provider_data.id not in [p.id for p in providers_dto]: + providers_dto.append(provider_dto) except KeyError: # Handle case where the provider is not installed try: diff --git a/pyproject.toml b/pyproject.toml index e847ed823..3412595b1 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -1,6 +1,6 @@ [tool.poetry] name = "keep" -version = "0.31.3" +version = "0.31.4" description = "Alerting. for developers, by developers." authors = ["Keep Alerting LTD"] packages = [{include = "keep"}]