From cfd0098019640bf07f9a10abcf21a5f53e7eb3ca Mon Sep 17 00:00:00 2001 From: xinwen Date: Wed, 14 Oct 2020 15:40:22 +0800 Subject: [PATCH] =?UTF-8?q?fix(perms):=20=E4=BF=AE=E5=A4=8D=E4=B8=80?= =?UTF-8?q?=E6=AC=A1=E6=80=A7=E8=8E=B7=E5=8F=96=E6=89=80=E6=9C=89=E8=B5=84?= =?UTF-8?q?=E4=BA=A7=E4=B8=8E=E8=8A=82=E7=82=B9sql=E6=B3=9B=E6=BB=A5?= =?UTF-8?q?=E9=97=AE=E9=A2=98?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../api/user_permission/user_permission_nodes_with_assets.py | 1 + 1 file changed, 1 insertion(+) diff --git a/apps/perms/api/user_permission/user_permission_nodes_with_assets.py b/apps/perms/api/user_permission/user_permission_nodes_with_assets.py index ae9f00536..3829f0beb 100644 --- a/apps/perms/api/user_permission/user_permission_nodes_with_assets.py +++ b/apps/perms/api/user_permission/user_permission_nodes_with_assets.py @@ -43,6 +43,7 @@ class MyGrantedNodesWithAssetsAsTreeApi(SerializeToTreeNodeMixin, ListAPIView): all_nodes = get_user_granted_nodes_list_via_mapping_node(user) all_assets = get_user_granted_all_assets(user) all_assets = all_assets.annotate(parent_key=F('nodes__key')) + all_assets = all_assets.prefetch_related('platform') data = [ *self.serialize_nodes(all_nodes, with_asset_amount=True),