diff --git a/asabiris/output/msteams/service.py b/asabiris/output/msteams/service.py index a2824c7..5076bf4 100644 --- a/asabiris/output/msteams/service.py +++ b/asabiris/output/msteams/service.py @@ -40,7 +40,7 @@ async def send(self, body, tenant): webhook_url = self.TeamsWebhookUrl # If tenant-specific MS Teams configuration is available, fetch the webhook URL - if tenant: + if tenant and self.ConfigService is not None: try: webhook_url = self.ConfigService.get_msteams_config(tenant) except KeyError: diff --git a/asabiris/output/slack/service.py b/asabiris/output/slack/service.py index 5e0e2e9..3c689aa 100644 --- a/asabiris/output/slack/service.py +++ b/asabiris/output/slack/service.py @@ -51,7 +51,7 @@ async def send_message(self, blocks, fallback_message, tenant=None) -> None: token, channel = (self.SlackWebhookUrl, self.Channel) - if tenant: + if tenant and self.ConfigService is not None: try: token, channel = self.ConfigService.get_slack_config(tenant) except KeyError: