From c103253867f20cf5ea6ed44b5b6550c5da0e8f20 Mon Sep 17 00:00:00 2001 From: Bai Date: Mon, 27 May 2024 18:02:28 +0800 Subject: [PATCH] perf: perm tree search --- apps/assets/api/tree.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/apps/assets/api/tree.py b/apps/assets/api/tree.py index 277ab323e..f5e39b4db 100644 --- a/apps/assets/api/tree.py +++ b/apps/assets/api/tree.py @@ -126,7 +126,7 @@ class NodeChildrenAsTreeApi(SerializeToTreeNodeMixin, NodeChildrenApi): include_assets = self.request.query_params.get('assets', '0') == '1' if not self.instance or not include_assets: return Asset.objects.none() - if self.instance.is_org_root(): + if not self.request.GET.get('search') and self.instance.is_org_root(): return Asset.objects.none() if query_all: assets = self.instance.get_all_assets()