Commit b577c626 authored by ibuler's avatar ibuler

[Bugfix] 修复luna取到协议不同的系统用户

parent 2e4e5503
...@@ -437,6 +437,7 @@ class UserGrantedNodeChildrenApi(ListAPIView): ...@@ -437,6 +437,7 @@ class UserGrantedNodeChildrenApi(ListAPIView):
for asset, system_users in nodes_granted[node].items(): for asset, system_users in nodes_granted[node].items():
fake_node = asset.as_node() fake_node = asset.as_node()
fake_node.assets_amount = 0 fake_node.assets_amount = 0
system_users = [s for s in system_users if s.protocol == asset.protocol]
fake_node.asset.system_users_granted = system_users fake_node.asset.system_users_granted = system_users
fake_node.key = node.key + ':0' fake_node.key = node.key + ':0'
fake_nodes.append(fake_node) fake_nodes.append(fake_node)
...@@ -459,6 +460,8 @@ class UserGrantedNodeChildrenApi(ListAPIView): ...@@ -459,6 +460,8 @@ class UserGrantedNodeChildrenApi(ListAPIView):
asset_has_matched = True asset_has_matched = True
fake_node = asset.as_node() fake_node = asset.as_node()
fake_node.assets_amount = 0 fake_node.assets_amount = 0
system_users = [s for s in system_users if
s.protocol == asset.protocol]
fake_node.asset.system_users_granted = system_users fake_node.asset.system_users_granted = system_users
fake_node.key = node.key + ':0' fake_node.key = node.key + ':0'
matched_assets.append(fake_node) matched_assets.append(fake_node)
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment