From b3e7138fdbfe130b160736372b201c30395a67f7 Mon Sep 17 00:00:00 2001 From: wmcowen Date: Thu, 12 Dec 2024 17:18:31 +0800 Subject: [PATCH] =?UTF-8?q?fix:=20=E5=BF=AB=E9=80=9F=E5=AE=A1=E6=89=B9?= =?UTF-8?q?=E9=80=9A=E7=9F=A5=E5=8F=91=E9=80=81=E5=A4=B1=E8=B4=A5=20(#1455?= =?UTF-8?q?)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- itsm/meta/services/notice_filter.py | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) 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) )