Fix case-sensitivity when sorting permission group labels
This commit is contained in:
parent
30e6b6e29c
commit
95b94ef570
|
@ -71,10 +71,10 @@ def PermissionsFieldRenderer(permissions, *args, **kwargs):
|
||||||
html += tags.hidden(self.name, value='') # ugly hack..or good idea?
|
html += tags.hidden(self.name, value='') # ugly hack..or good idea?
|
||||||
else:
|
else:
|
||||||
html = ''
|
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'])
|
inner = HTML.tag('p', c=permissions[groupkey]['label'])
|
||||||
perms = permissions[groupkey]['perms']
|
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)
|
checked = has_permission(Session(), role, key, include_guest=False)
|
||||||
label = perms[key]['label']
|
label = perms[key]['label']
|
||||||
if readonly:
|
if readonly:
|
||||||
|
|
Loading…
Reference in a new issue