diff --git a/apps/assets/filters.py b/apps/assets/filters.py index b68d9d127..94a49a3f5 100644 --- a/apps/assets/filters.py +++ b/apps/assets/filters.py @@ -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)