From fe52c57a1133976c585d9db0acf0331c142a8c6e Mon Sep 17 00:00:00 2001
From: ibuler <ibuler@qq.com>
Date: Thu, 24 May 2018 11:13:22 +0800
Subject: [PATCH] =?UTF-8?q?[Bugfix]=20=E4=BF=AE=E5=A4=8D=E6=8E=88=E6=9D=83?=
 =?UTF-8?q?uitls=E7=9A=84=E9=94=99=E8=AF=AF?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit

---
 apps/perms/utils.py | 6 ++----
 1 file changed, 2 insertions(+), 4 deletions(-)

diff --git a/apps/perms/utils.py b/apps/perms/utils.py
index abcd2e17..36349b98 100644
--- a/apps/perms/utils.py
+++ b/apps/perms/utils.py
@@ -197,10 +197,8 @@ class AssetPermissionUtil:
                     in_node = True
                     nodes[node][asset].update(_system_users)
             if not in_node:
-                if unnode in nodes:
-                    nodes[unnode][asset].update(_system_users)
-                else:
-                    nodes[unnode][asset] = _system_users
+                nodes[unnode] = defaultdict(set)
+                nodes[unnode][asset].update(_system_users)
         return nodes
 
     @classmethod
-- 
2.18.0