From ef8fdf42fbd1bbcd529435d2d88de212f50ee980 Mon Sep 17 00:00:00 2001 From: Tal Borenstein Date: Thu, 24 Oct 2024 19:37:28 +0300 Subject: [PATCH] fix: another one --- keep/api/routes/alerts.py | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/keep/api/routes/alerts.py b/keep/api/routes/alerts.py index 95645a774..8a35b8f9d 100644 --- a/keep/api/routes/alerts.py +++ b/keep/api/routes/alerts.py @@ -465,7 +465,6 @@ def enrich_alert( def _enrich_alert( enrich_data: EnrichAlertRequestBody, - pusher_client: Pusher | None = get_pusher_client(), authenticated_entity: AuthenticatedEntity = Depends( IdentityManagerFactory.get_auth_verifier(["write:alert"]) ), @@ -479,7 +478,6 @@ def _enrich_alert( "tenant_id": tenant_id, }, ) - try: enrichement_bl = EnrichmentsBl(tenant_id) # Shahar: TODO, change to the specific action type, good enough for now @@ -540,6 +538,7 @@ def _enrich_alert( logger.exception("Failed to push alert to elasticsearch") pass # use pusher to push the enriched alert to the client + pusher_client = get_pusher_client() if pusher_client: logger.info("Telling client to poll alerts") try: