fix: 操作日志全局组织数量不对 (#11859)

Co-authored-by: feng <1304903146@qq.com>
pull/11860/head
fit2bot 2023-10-16 18:51:26 +08:00 committed by GitHub
parent bda23b3d2a
commit 5c0905b3b5
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 2 additions and 3 deletions

View File

@ -218,11 +218,10 @@ class OperateLogViewSet(OrgReadonlyModelViewSet):
return super().get_serializer_class()
def get_queryset(self):
org_q = Q(org_id=current_org.id)
org_q = Q()
if self.is_action_detail:
org_q |= Q(org_id=Organization.SYSTEM_ID)
with tmp_to_root_org():
qs = OperateLog.objects.filter(org_q)
qs = OperateLog.objects.filter(org_q)
es_config = settings.OPERATE_LOG_ELASTICSEARCH_CONFIG
if es_config:
engine_mod = import_module(TYPE_ENGINE_MAPPING['es'])