mirror of
https://github.com/jumpserver/jumpserver.git
synced 2025-09-26 07:22:27 +00:00
fix: 修复授权树一些问题
This commit is contained in:
@@ -337,9 +337,9 @@ class NodeAllAssetsMappingMixin:
|
||||
|
||||
t1 = time.time()
|
||||
with tmp_to_org(org_id):
|
||||
nodes_id_key = Node.objects.filter(org_id=org_id) \
|
||||
.annotate(char_id=output_as_string('id')) \
|
||||
.values_list('char_id', 'key')
|
||||
nodes_id_key = Node.objects.annotate(
|
||||
char_id=output_as_string('id')
|
||||
).values_list('char_id', 'key')
|
||||
|
||||
# * 直接取出全部. filter(node__org_id=org_id)(大规模下会更慢)
|
||||
nodes_assets_id = Asset.nodes.through.objects.all() \
|
||||
|
Reference in New Issue
Block a user