From 6c19fd41922930662bfe45dfeb139d64eda725ad Mon Sep 17 00:00:00 2001 From: fit2bot <68588906+fit2bot@users.noreply.github.com> Date: Thu, 18 May 2023 15:42:30 +0800 Subject: [PATCH] =?UTF-8?q?fix:=20=E4=BF=AE=E5=A4=8D=20luna=20=E7=B1=BB?= =?UTF-8?q?=E5=9E=8B=E6=A0=91=E6=95=B0=E9=87=8F=E8=AE=A1=E7=AE=97=E4=B8=8D?= =?UTF-8?q?=E5=87=86=E7=A1=AEbug=20(#10492)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Co-authored-by: feng <1304903146@qq.com> --- apps/perms/api/user_permission/tree/node_with_asset.py | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/apps/perms/api/user_permission/tree/node_with_asset.py b/apps/perms/api/user_permission/tree/node_with_asset.py index d1da28fbb..5469c6ed3 100644 --- a/apps/perms/api/user_permission/tree/node_with_asset.py +++ b/apps/perms/api/user_permission/tree/node_with_asset.py @@ -177,8 +177,7 @@ class UserPermedNodeChildrenWithAssetsAsCategoryTreeApi( return [] pid = f'ROOT_{str(assets[0].category).upper()}_{tp}' return self.serialize_assets(assets, pid=pid) - - resource_platforms = assets.values_list('platform_id', flat=True) + resource_platforms = assets.order_by('id').values_list('platform_id', flat=True) node_all = AllTypes.get_tree_nodes(resource_platforms) pattern = re.compile(r'\(0\)?') nodes = []