PR#3368: Order channels at hosts page
Merges #3368 https://pagure.io/koji/pull-request/3368 Fixes: #3367 https://pagure.io/koji/issue/3367 Channels at hosts page are not ordered
This commit is contained in:
commit
1c34c8caf8
1 changed files with 2 additions and 1 deletions
|
|
@ -1685,7 +1685,8 @@ def hosts(environ, state='enabled', start=None, order='name', ready='all', chann
|
|||
host['channels'] = []
|
||||
host['channels_id'] = []
|
||||
host['channels_enabled'] = []
|
||||
for chan in channels.result:
|
||||
channels = sorted(channels.result, key=lambda x: x['name'])
|
||||
for chan in channels:
|
||||
host['channels'].append(chan['name'])
|
||||
host['channels_id'].append(chan['id'])
|
||||
if chan['enabled']:
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue