Fix case-sensitivity when sorting permission group labels

This commit is contained in:
Lance Edgar 2016-04-06 21:43:48 -05:00
parent 30e6b6e29c
commit 95b94ef570

View file

@ -71,10 +71,10 @@ def PermissionsFieldRenderer(permissions, *args, **kwargs):
html += tags.hidden(self.name, value='') # ugly hack..or good idea?
else:
html = ''
for groupkey in sorted(permissions, key=lambda k: permissions[k]['label']):
for groupkey in sorted(permissions, key=lambda k: permissions[k]['label'].lower()):
inner = HTML.tag('p', c=permissions[groupkey]['label'])
perms = permissions[groupkey]['perms']
for key in sorted(perms, key=lambda p: perms[p]['label']):
for key in sorted(perms, key=lambda p: perms[p]['label'].lower()):
checked = has_permission(Session(), role, key, include_guest=False)
label = perms[key]['label']
if readonly: