Merge pull request #4021 from jumpserver/dev_asset

[Bugfix] 修复只显示当前节点下资产不生效的问题
pull/4022/head
BaiJiangJie 5 years ago committed by GitHub
commit 2053e9210e
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

@ -58,7 +58,9 @@ class AssetByNodeFilterBackend(filters.BaseFilterBackend):
if query_all:
pattern = node.get_all_children_pattern(with_self=True)
else:
pattern = node.get_children_key_pattern(with_self=True)
# pattern = node.get_children_key_pattern(with_self=True)
# 只显示当前节点下资产
pattern = r"^{}$".format(node.key)
return self.perform_query(pattern, queryset)

Loading…
Cancel
Save