Skip to content

Commit

Permalink
Handle no suppressed signatures - fixes #66
Browse files Browse the repository at this point in the history
  • Loading branch information
PaperMtn committed Dec 19, 2024
1 parent f624f4c commit 5f75a5a
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 2 deletions.
5 changes: 5 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -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.
Expand Down
6 changes: 4 additions & 2 deletions src/slack_watchman/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -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,
Expand Down

0 comments on commit 5f75a5a

Please sign in to comment.