From 5d9e3a8cf043f7712d76a812cc60ff50f43548ef Mon Sep 17 00:00:00 2001 From: Tal Borenstein Date: Thu, 5 Dec 2024 14:32:57 +0200 Subject: [PATCH] fix: revert validation for Slack provider to work with oauth --- keep/parser/parser.py | 2 +- keep/providers/slack_provider/slack_provider.py | 5 ++--- 2 files changed, 3 insertions(+), 4 deletions(-) diff --git a/keep/parser/parser.py b/keep/parser/parser.py index 837018c99..1fadd594f 100644 --- a/keep/parser/parser.py +++ b/keep/parser/parser.py @@ -144,7 +144,7 @@ def _parse_workflow( self._load_providers_config( tenant_id, context_manager, workflow, providers_file, workflow_providers ) - # Parsethe actions (from workflow, actions yaml and database) + # Parse the actions (from workflow, actions yaml and database) self._load_actions_config( tenant_id, context_manager, workflow, actions_file, workflow_actions ) diff --git a/keep/providers/slack_provider/slack_provider.py b/keep/providers/slack_provider/slack_provider.py index b571b3539..003c34b76 100644 --- a/keep/providers/slack_provider/slack_provider.py +++ b/keep/providers/slack_provider/slack_provider.py @@ -13,20 +13,19 @@ from keep.exceptions.provider_exception import ProviderException from keep.providers.base.base_provider import BaseProvider from keep.providers.models.provider_config import ProviderConfig -from keep.validation.fields import HttpsUrl @pydantic.dataclasses.dataclass class SlackProviderAuthConfig: """Slack authentication configuration.""" - webhook_url: HttpsUrl = dataclasses.field( + webhook_url: str = dataclasses.field( metadata={ "required": True, "description": "Slack Webhook Url", - "validation": "https_url", "sensitive": True, }, + default="", ) access_token: str = dataclasses.field( metadata={