mirror of https://github.com/jumpserver/jumpserver
parent
ddcd09c6a6
commit
ec4cdc801f
|
@ -147,8 +147,7 @@ class OperateLogViewSet(OrgReadonlyModelViewSet):
|
|||
return super().get_serializer_class()
|
||||
|
||||
def get_queryset(self):
|
||||
with tmp_to_root_org():
|
||||
qs = OperateLog.objects.all()
|
||||
qs = OperateLog.objects.all()
|
||||
es_config = settings.OPERATE_LOG_ELASTICSEARCH_CONFIG
|
||||
if es_config:
|
||||
engine_mod = import_module(TYPE_ENGINE_MAPPING['es'])
|
||||
|
|
|
@ -101,9 +101,9 @@ class DateTimeMixin:
|
|||
|
||||
@lazyproperty
|
||||
def operate_logs_queryset(self):
|
||||
from audits.api import OperateLogViewSet
|
||||
t = self.days_to_datetime
|
||||
queryset = OperateLog.objects.filter(datetime__gte=t)
|
||||
queryset = self.get_logs_queryset(queryset, 'user')
|
||||
queryset = OperateLogViewSet().get_queryset().filter(datetime__gte=t)
|
||||
return queryset
|
||||
|
||||
@lazyproperty
|
||||
|
|
Loading…
Reference in New Issue