Merge pull request #2582 from jumpserver/dev_bugfix_assets

[Bugfix] 修复资产对象获取所有节点时的bug
pull/2583/head
老广 2019-04-04 12:21:42 +08:00 committed by GitHub
commit 638ba31694
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 1 additions and 1 deletions

View File

@ -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