mirror of https://github.com/jumpserver/jumpserver
Merge pull request #11320 from jumpserver/pr@dev@fix_operatelog_not_record_component
fix: 操作日志判断is_service_account为匿名用户会报错pull/11322/head
commit
737cae8d03
|
@ -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:
|
||||
|
|
Loading…
Reference in New Issue