Sort channels on hosts page

Related: https://pagure.io/koji/issue/3907
This commit is contained in:
Tomas Kopecek 2023-09-05 14:01:19 +02:00
parent 8348e25984
commit 3644da0741

View file

@ -1723,7 +1723,7 @@ def hosts(environ, state='enabled', start=None, order='name', ready='all', chann
channel = 'all'
values['channel'] = channel
values['channels'] = server.listChannels()
values['channels'] = sorted(server.listChannels(), key=lambda x: x['name'])
if hosts and 'update_ts' not in hosts[0]:
# be nice with older hub