fix: 修复 luna 类型树数量计算不准确bug (#10492)

Co-authored-by: feng <1304903146@qq.com>
This commit is contained in:
fit2bot
2023-05-18 15:42:30 +08:00
committed by GitHub
parent b0b14fe2e1
commit 6c19fd4192

View File

@@ -177,8 +177,7 @@ class UserPermedNodeChildrenWithAssetsAsCategoryTreeApi(
return []
pid = f'ROOT_{str(assets[0].category).upper()}_{tp}'
return self.serialize_assets(assets, pid=pid)
resource_platforms = assets.values_list('platform_id', flat=True)
resource_platforms = assets.order_by('id').values_list('platform_id', flat=True)
node_all = AllTypes.get_tree_nodes(resource_platforms)
pattern = re.compile(r'\(0\)?')
nodes = []