diff --git a/apps/audits/api.py b/apps/audits/api.py index 703dea3b8..8f833aad8 100644 --- a/apps/audits/api.py +++ b/apps/audits/api.py @@ -13,7 +13,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 @@ -151,9 +150,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']) diff --git a/apps/audits/migrations/0021_auto_20230207_0857.py b/apps/audits/migrations/0021_auto_20230207_0857.py index 6913d21c7..4e66c63f0 100644 --- a/apps/audits/migrations/0021_auto_20230207_0857.py +++ b/apps/audits/migrations/0021_auto_20230207_0857.py @@ -8,6 +8,7 @@ class Migration(migrations.Migration): dependencies = [ ('audits', '0020_auto_20230117_1004'), + ('ops', '0023_auto_20220912_0021'), ] operations = [