From 95b94ef5701e8984d3a3c7350e7534bf49b42e17 Mon Sep 17 00:00:00 2001 From: Lance Edgar Date: Wed, 6 Apr 2016 21:43:48 -0500 Subject: [PATCH] Fix case-sensitivity when sorting permission group labels --- tailbone/views/roles.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/tailbone/views/roles.py b/tailbone/views/roles.py index 858775e4..8b6529d4 100644 --- a/tailbone/views/roles.py +++ b/tailbone/views/roles.py @@ -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: