mirror of https://github.com/jumpserver/jumpserver
fix: 解决跨组织资源的Activty在其他组织下404的问题
parent
d795139108
commit
3334f79e84
|
@ -12,7 +12,6 @@ from common.api import JMSGenericViewSet
|
|||
from common.drf.filters import DatetimeRangeFilter
|
||||
from common.plugins.es import QuerySet as ESQuerySet
|
||||
from orgs.mixins.api import OrgGenericViewSet, OrgBulkModelViewSet
|
||||
from orgs.models import Organization
|
||||
from orgs.utils import current_org, tmp_to_root_org
|
||||
from users.models import User
|
||||
from .backends import TYPE_ENGINE_MAPPING
|
||||
|
@ -149,9 +148,7 @@ class OperateLogViewSet(RetrieveModelMixin, ListModelMixin, OrgGenericViewSet):
|
|||
|
||||
def get_queryset(self):
|
||||
with tmp_to_root_org():
|
||||
qs = OperateLog.objects.filter(
|
||||
Q(org_id=current_org.id) | Q(org_id=Organization.SYSTEM_ID)
|
||||
)
|
||||
qs = OperateLog.objects.all()
|
||||
es_config = settings.OPERATE_LOG_ELASTICSEARCH_CONFIG
|
||||
if es_config:
|
||||
engine_mod = import_module(TYPE_ENGINE_MAPPING['es'])
|
||||
|
|
Loading…
Reference in New Issue