fix: Sort Permissions in Group List
This commit is contained in:
parent
4529cd5fca
commit
da11ab8bc7
@ -77,9 +77,9 @@ def show_list(request):
|
||||
list = DBSession.query(Group).order_by(Group.name).all()
|
||||
|
||||
groups = []
|
||||
for item in sorted(list, key=lambda permission:permission.name):
|
||||
for item in list:
|
||||
group = {'Name': item.name, 'Permissions': [], 'Url': request.route_url('group_id', id=item.id)}
|
||||
for permission in item.roles:
|
||||
for permission in sorted(item.roles, key=lambda p:p.name):
|
||||
group['Permissions'].append(permission.name)
|
||||
groups.append(group)
|
||||
return groups
|
||||
|
Loading…
Reference in New Issue
Block a user