perf: 修复授权应用树的问题

This commit is contained in:
ibuler
2021-07-29 19:36:08 +08:00
committed by 老广
parent d0e119fb50
commit f031f4d560
3 changed files with 22 additions and 17 deletions

View File

@@ -12,6 +12,7 @@ class SerializeApplicationToTreeNodeMixin:
def filter_organizations(applications):
organization_ids = set(applications.values_list('org_id', flat=True))
organizations = [Organization.get_instance(org_id) for org_id in organization_ids]
organizations.sort(key=lambda x: x.name)
return organizations
@staticmethod