diff --git a/itsm/meta/services/notice_filter.py b/itsm/meta/services/notice_filter.py index cc26615c..9e51e635 100644 --- a/itsm/meta/services/notice_filter.py +++ b/itsm/meta/services/notice_filter.py @@ -32,14 +32,16 @@ def notice_receiver_filter(receivers): if not receivers: return receivers + receiver_type = "list" if isinstance(receivers, str): + receiver_type = "str" receivers = receivers.strip().split(",") notice_blacklist = ContextService.get_context_value_list("notice_blacklist") filtered_receivers = [i for i in receivers if i not in notice_blacklist] return ( filtered_receivers - if isinstance(receivers, list) + if receiver_type == "list" else ",".join(filtered_receivers) )