perf: perm tree search

pull/13304/head
Bai 2024-05-27 18:02:28 +08:00 committed by Bryan
parent 81da9e018a
commit c103253867
1 changed files with 1 additions and 1 deletions

View File

@ -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()