mirror of
https://github.com/jumpserver/jumpserver.git
synced 2025-09-21 19:38:07 +00:00
fix: 修复一些 Root 组织没数据的问题
This commit is contained in:
@@ -70,7 +70,7 @@ class OrgBulkModelViewSet(CommonApiMixin, OrgViewSetMixin, BulkModelViewSet):
|
||||
class OrgRelationMixin(RelationMixin):
|
||||
def get_queryset(self):
|
||||
queryset = super().get_queryset()
|
||||
org_id = current_org.org_id()
|
||||
if org_id is not None:
|
||||
if not current_org.is_root():
|
||||
org_id = current_org.org_id()
|
||||
queryset = queryset.filter(**{f'{self.from_field}__org_id': org_id})
|
||||
return queryset
|
||||
|
Reference in New Issue
Block a user