From d0ac0f575e3ea14a0b3ae88d59ee6d2afb95bbd5 Mon Sep 17 00:00:00 2001 From: vapao Date: Fri, 27 Mar 2020 12:14:39 +0800 Subject: [PATCH] =?UTF-8?q?F=20=E4=BF=AE=E5=A4=8D=E6=8A=A5=E8=AD=A6?= =?UTF-8?q?=E8=81=94=E7=B3=BB=E7=BB=84=E5=88=A0=E9=99=A4=E9=97=AE=E9=A2=98?= =?UTF-8?q?=20#43?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- spug_api/apps/alarm/views.py | 2 +- spug_web/src/pages/alarm/group/Table.js | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/spug_api/apps/alarm/views.py b/spug_api/apps/alarm/views.py index fb6347b..834796d 100644 --- a/spug_api/apps/alarm/views.py +++ b/spug_api/apps/alarm/views.py @@ -40,7 +40,7 @@ class GroupView(View): Argument('id', type=int, help='请指定操作对象') ).parse(request.GET) if error is None: - detection = Detection.objects.filter(notify_grp__contains=f'\"{form.id}\"').first() + detection = Detection.objects.filter(notify_grp__regex=fr'\D{form.id}\D').first() if detection: return json_response(error=f'监控任务【{detection.name}】正在使用该报警组,请解除关联后再尝试删除该联系组') Group.objects.filter(pk=form.id).delete() diff --git a/spug_web/src/pages/alarm/group/Table.js b/spug_web/src/pages/alarm/group/Table.js index c6a2dc5..8d4f047 100644 --- a/spug_web/src/pages/alarm/group/Table.js +++ b/spug_web/src/pages/alarm/group/Table.js @@ -72,7 +72,7 @@ class ComTable extends React.Component { title: '删除确认', content: `确定要删除【${text['name']}】?`, onOk: () => { - return http.delete('/api/exec/template/', {params: {id: text.id}}) + return http.delete('/api/alarm/group/', {params: {id: text.id}}) .then(() => { message.success('删除成功'); store.fetchRecords()