workflows: force list before sorting (#36515)

This commit is contained in:
Frédéric Péters 2019-11-12 21:28:32 +01:00
parent 05abc1038d
commit 4746d75099
1 changed files with 1 additions and 1 deletions

View File

@ -1443,7 +1443,7 @@ class WorkflowPage(Directory):
r += htmltext(' <span class="change">(<a rel="popup" href="functions/new">%s</a>)</span>') % _('add function')
r += htmltext('</h3>')
r += htmltext('<ul id="roles-list" class="biglist">')
workflow_roles = (self.workflow.roles or {}).items()
workflow_roles = list((self.workflow.roles or {}).items())
workflow_roles.sort(key=lambda x: -1 if x[0] == '_receiver' else misc.simplify(x[1]))
for key, label in workflow_roles:
r += htmltext('<li class="biglistitem">')