From 87abe63a201c45e84a70d8c701b59330adef6c65 Mon Sep 17 00:00:00 2001 From: ibuler Date: Wed, 14 Nov 2018 12:48:59 +0800 Subject: [PATCH] =?UTF-8?q?[Bugfix]=20=E4=BF=AE=E5=A4=8Dluna=E4=B8=8D?= =?UTF-8?q?=E6=98=BE=E7=A4=BA=E5=A4=9A=E7=BB=84=E7=BB=87=E8=B5=84=E4=BA=A7?= =?UTF-8?q?=E7=9A=84=E9=97=AE=E9=A2=98?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- apps/perms/api.py | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/apps/perms/api.py b/apps/perms/api.py index d1cdc747d..98287212f 100644 --- a/apps/perms/api.py +++ b/apps/perms/api.py @@ -417,8 +417,7 @@ class UserGrantedNodeChildrenApi(ListAPIView): queryset = [] if node_id and node_id in [str(node.id) for node in nodes_granted]: - node = [node for node in nodes_granted if str(node.id) == node_id][ - 0] + node = [node for node in nodes_granted if str(node.id) == node_id][0] elif len(root_nodes) == 1: node = root_nodes[0] node.assets_amount = len(nodes_granted[node])