From e9cad5500975fd4f80d162edba6b55a0b396b244 Mon Sep 17 00:00:00 2001 From: Prateek Thakare Date: Wed, 4 Dec 2024 16:43:44 +0530 Subject: [PATCH] Fixed the channel errors and import errors --- mantis/config_parsers/config_models.py | 2 +- mantis/utils/crud_utils.py | 2 +- mantis/utils/tool_utils.py | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/mantis/config_parsers/config_models.py b/mantis/config_parsers/config_models.py index c4a16e8..faf48e3 100644 --- a/mantis/config_parsers/config_models.py +++ b/mantis/config_parsers/config_models.py @@ -34,7 +34,7 @@ class Notify(BaseModel): # This function will check for the channel types that are integrated in Mantis. @validator('channel') def check_channel(cls, v): - valid_channels = ['slack'] + valid_channels = ['slack', 'mattermost'] for key in v.keys(): if key not in valid_channels: raise ValueError("Invalid channel Name specified. Please only select amongst following options: ", valid_channels) diff --git a/mantis/utils/crud_utils.py b/mantis/utils/crud_utils.py index e4d1c5a..c882301 100644 --- a/mantis/utils/crud_utils.py +++ b/mantis/utils/crud_utils.py @@ -7,7 +7,7 @@ from mantis.utils.common_utils import CommonUtils from mantis.config_parsers.config_client import ConfigProvider from mantis.constants import ASSET_TYPE_SUBDOMAIN -from mantis.utils.tool_utils import get_findings_by_asset , get_passives_by_asset +from mantis.utils.tool_utils import get_findings_by_asset from pymongo import UpdateOne, InsertOne from pydantic import ValidationError from datetime import datetime diff --git a/mantis/utils/tool_utils.py b/mantis/utils/tool_utils.py index bee6433..87a67b2 100644 --- a/mantis/utils/tool_utils.py +++ b/mantis/utils/tool_utils.py @@ -193,7 +193,7 @@ async def get_extended_by_asset(asset: str, asset_type: str = None): } }) - passives = await read_passives(pipeline) + passives = await read_extended_assets(pipeline) return passives if passives else []