mirror of
https://github.com/jumpserver/jumpserver.git
synced 2025-09-17 15:59:04 +00:00
fix: 修复异步加载luna资产授权树时根节点下资产没有返回的问题
This commit is contained in:
@@ -102,6 +102,12 @@ class UserPermedNodeChildrenWithAssetsAsTreeApi(BaseUserNodeWithAssetAsTreeApi):
|
||||
if not node_key:
|
||||
nodes = query_node_util.get_top_level_nodes()
|
||||
assets = Asset.objects.none()
|
||||
# 获取根节点下的资产
|
||||
for node in nodes:
|
||||
if not node.key.isdigit():
|
||||
continue
|
||||
assets = query_asset_util.get_node_assets(key=node.key)
|
||||
break
|
||||
elif node_key == PermNode.UNGROUPED_NODE_KEY:
|
||||
nodes = PermNode.objects.none()
|
||||
assets = query_asset_util.get_ungroup_assets()
|
||||
|
Reference in New Issue
Block a user