Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix: 快速审批通知发送失败 #1455

Merged
merged 9 commits into from
Dec 12, 2024
4 changes: 3 additions & 1 deletion itsm/meta/services/notice_filter.py
Original file line number Diff line number Diff line change
Expand Up @@ -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)
)

Expand Down