From cf6ce0fa2e2753a62efdbec1d8a0a2fbd1950997 Mon Sep 17 00:00:00 2001 From: jiangweidong Date: Thu, 17 Aug 2023 16:21:30 +0800 Subject: [PATCH] =?UTF-8?q?fix:=20=E6=93=8D=E4=BD=9C=E6=97=A5=E5=BF=97?= =?UTF-8?q?=E5=88=A4=E6=96=ADis=5Fservice=5Faccount=E4=B8=BA=E5=8C=BF?= =?UTF-8?q?=E5=90=8D=E7=94=A8=E6=88=B7=E4=BC=9A=E6=8A=A5=E9=94=99?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- apps/audits/signal_handlers/operate_log.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/apps/audits/signal_handlers/operate_log.py b/apps/audits/signal_handlers/operate_log.py index 69e6a5a50..826c11c8b 100644 --- a/apps/audits/signal_handlers/operate_log.py +++ b/apps/audits/signal_handlers/operate_log.py @@ -76,7 +76,7 @@ def signal_of_operate_log_whether_continue( condition = False # 不记录组件的操作日志 user = current_request.user if current_request else None - if not user or user.is_service_account: + if not user or getattr(user, 'is_service_account', False): condition = False # 终端模型的 create 事件由系统产生,不记录 if instance._meta.object_name == 'Terminal' and created: