From c5cad8329467abfafad32e5a6fa04fcdb0cdb4f3 Mon Sep 17 00:00:00 2001 From: pengshiyu <1940607002@qq.com> Date: Wed, 21 Feb 2024 22:48:00 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BF=AE=E5=A4=8D=E8=A7=A6=E5=8F=91=E5=88=86?= =?UTF-8?q?=E7=BB=84=E6=96=B0=E5=A2=9E=E5=88=86=E7=BB=84=E5=90=8E=E6=97=A0?= =?UTF-8?q?=E6=B3=95=E8=87=AA=E5=8A=A8=E5=8B=BE=E9=80=89=E9=97=AE=E9=A2=98?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- domain_admin/api/notify_api.py | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/domain_admin/api/notify_api.py b/domain_admin/api/notify_api.py index e2982bb018..84b84f6e83 100644 --- a/domain_admin/api/notify_api.py +++ b/domain_admin/api/notify_api.py @@ -127,8 +127,8 @@ def add_notify(): type_id = request.json['type_id'] event_id = request.json['event_id'] value = request.json['value'] - groups = request.json['groups'] expire_days = request.json['expire_days'] + groups = request.json.get('groups') or [] comment = request.json.get('comment') or '' value_raw = json.dumps(value, ensure_ascii=False) @@ -203,9 +203,10 @@ def update_notify_by_id(): event_id = request.json['event_id'] value = request.json['value'] - groups = request.json['groups'] + expire_days = request.json['expire_days'] comment = request.json.get('comment') or '' + groups = request.json.get('groups') or [] value_raw = json.dumps(value, ensure_ascii=False) groups_raw = json.dumps(groups, ensure_ascii=False)