fix: 日志审计-> 批量命令 全局组织无数据

pull/5791/head
xinwen 2021-03-18 10:27:14 +08:00 committed by Jiangjie.Bai
parent a9b5599db5
commit 4e0c056867
1 changed files with 2 additions and 0 deletions

View File

@ -100,6 +100,8 @@ class CommandExecutionViewSet(ListModelMixin, OrgGenericViewSet):
def get_queryset(self):
queryset = super().get_queryset()
if current_org.is_root():
return queryset
queryset = queryset.filter(run_as__org_id=current_org.org_id())
return queryset