mirror of https://github.com/jumpserver/jumpserver
[Bugfix] 修复获取数量是报错
parent
c163427db2
commit
87247da0ec
|
@ -136,7 +136,10 @@ class TreeService(Tree):
|
|||
if assets:
|
||||
return assets
|
||||
assets = set(self.assets(nid))
|
||||
children = self.children(nid)
|
||||
try:
|
||||
children = self.children(nid)
|
||||
except NodeIDAbsentError:
|
||||
children = []
|
||||
for child in children:
|
||||
assets.update(self.all_assets(child.identifier))
|
||||
self.all_nodes_assets_map[nid] = assets
|
||||
|
|
Loading…
Reference in New Issue