From 5f75a5a907702494d38be9efa082e0f27b7c4d91 Mon Sep 17 00:00:00 2001 From: PaperMtn Date: Thu, 19 Dec 2024 07:33:03 +0000 Subject: [PATCH] Handle no suppressed signatures - fixes #66 --- CHANGELOG.md | 5 +++++ src/slack_watchman/__init__.py | 6 ++++-- 2 files changed, 9 insertions(+), 2 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index d934612..085096d 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,3 +1,8 @@ +## [4.4.1] - 2024-12-18 +### Fixed +- Fixed a bug where an exception was raised when no suppressed signatures were passed + - Fixes [Issue #66](https://github.com/PaperMtn/slack-watchman/issues/66) + ## [4.4.0] - 2024-11-20 ### Added - Ability to disable signatures by their ID in the `watchman.conf` config file. diff --git a/src/slack_watchman/__init__.py b/src/slack_watchman/__init__.py index 8184076..200f6da 100644 --- a/src/slack_watchman/__init__.py +++ b/src/slack_watchman/__init__.py @@ -109,8 +109,10 @@ def suppress_disabled_signatures(signatures: List[signature.Signature], Returns: List of signatures with disabled signatures removed """ - - return [sig for sig in signatures if sig.id not in disabled_signatures] + try: + return [sig for sig in signatures if sig.id not in disabled_signatures] + except TypeError: + return signatures def search(slack_connection: SlackClient,