Browse Source

[Bugfix] 修复资产对象获取所有节点时的bug

pull/2582/head
BaiJiangJie 6 years ago
parent
commit
c31b169cae
  1. 2
      apps/assets/models/asset.py

2
apps/assets/models/asset.py

@ -153,7 +153,7 @@ class Asset(OrgModelMixin):
nodes = []
for node in self.get_nodes():
_nodes = node.get_ancestor(with_self=True)
_nodes.append(_nodes)
nodes.append(_nodes)
if flat:
nodes = list(reduce(lambda x, y: set(x) | set(y), nodes))
return nodes

Loading…
Cancel
Save