mirror of https://github.com/jumpserver/jumpserver
[Bugfix] 修复只显示当前节点下资产不生效的问题
parent
4ec4869896
commit
7c44f74068
|
@ -58,7 +58,9 @@ class AssetByNodeFilterBackend(filters.BaseFilterBackend):
|
||||||
if query_all:
|
if query_all:
|
||||||
pattern = node.get_all_children_pattern(with_self=True)
|
pattern = node.get_all_children_pattern(with_self=True)
|
||||||
else:
|
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)
|
return self.perform_query(pattern, queryset)
|
||||||
|
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue