From 1a30675a868d9cc9627d2a829fba80e040866852 Mon Sep 17 00:00:00 2001 From: xinwen Date: Tue, 15 Jun 2021 20:20:47 +0800 Subject: [PATCH] =?UTF-8?q?fix:=20=E5=8E=BB=E6=8E=89=E5=91=BD=E4=BB=A4?= =?UTF-8?q?=E5=91=8A=E8=AD=A6=E5=BC=80=E5=85=B3?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- apps/terminal/api/command.py | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/apps/terminal/api/command.py b/apps/terminal/api/command.py index b43910e26..9e3065e99 100644 --- a/apps/terminal/api/command.py +++ b/apps/terminal/api/command.py @@ -204,8 +204,6 @@ class InsecureCommandAlertAPI(generics.CreateAPIView): serializer.is_valid(raise_exception=True) commands = serializer.validated_data for command in commands: - if command['risk_level'] >= settings.SECURITY_INSECURE_COMMAND_LEVEL and \ - settings.SECURITY_INSECURE_COMMAND and \ - settings.SECURITY_INSECURE_COMMAND_EMAIL_RECEIVER: + if command['risk_level'] >= settings.SECURITY_INSECURE_COMMAND_LEVEL: CommandAlertMessage(command).publish_async() return Response()