mirror of
https://github.com/jumpserver/jumpserver.git
synced 2025-08-31 15:11:27 +00:00
修复: 控制台 - 账号 - 账号列表 - 查看账号详情时的500错误
This commit is contained in:
committed by
Jiangjie.Bai
parent
e762a5d8ae
commit
e8163167c5
@@ -9,6 +9,8 @@ from rest_framework.request import Request
|
||||
|
||||
from common.exceptions import UserConfirmRequired
|
||||
from common.utils import i18n_fmt
|
||||
from orgs.utils import current_org
|
||||
from orgs.models import Organization
|
||||
from audits.handler import create_or_update_operate_log
|
||||
from audits.const import ActionChoices, ActivityChoices
|
||||
from audits.models import ActivityLog
|
||||
@@ -91,7 +93,8 @@ class RecordViewLogMixin:
|
||||
activities = [
|
||||
ActivityLog(
|
||||
resource_id=getattr(resource_id, 'pk', resource_id),
|
||||
type=ActivityChoices.operate_log, detail=detail
|
||||
type=ActivityChoices.operate_log, detail=detail,
|
||||
org_id=Organization.ROOT_ID if current_org.is_root() else None,
|
||||
)
|
||||
for resource_id in ids
|
||||
]
|
||||
|
Reference in New Issue
Block a user