From 18c3c579309af1e2146f2017db942ce6078f3070 Mon Sep 17 00:00:00 2001 From: Lance Edgar Date: Tue, 3 May 2022 14:13:47 -0500 Subject: [PATCH] Sort roles list when viewing a user --- tailbone/views/users.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tailbone/views/users.py b/tailbone/views/users.py index d9815f50..1fb1250d 100644 --- a/tailbone/views/users.py +++ b/tailbone/views/users.py @@ -386,7 +386,7 @@ class UserView(PrincipalMasterView): return six.text_type(name) def render_roles(self, user, field): - roles = user.roles + roles = sorted(user.roles, key=lambda r: r.name) items = [] for role in roles: text = role.name