[Bugfix] 修复获取数量是报错

pull/3400/head
ibuler 5 years ago
parent c163427db2
commit 87247da0ec

@ -136,7 +136,10 @@ class TreeService(Tree):
if assets: if assets:
return assets return assets
assets = set(self.assets(nid)) assets = set(self.assets(nid))
try:
children = self.children(nid) children = self.children(nid)
except NodeIDAbsentError:
children = []
for child in children: for child in children:
assets.update(self.all_assets(child.identifier)) assets.update(self.all_assets(child.identifier))
self.all_nodes_assets_map[nid] = assets self.all_nodes_assets_map[nid] = assets

Loading…
Cancel
Save