From 5785b79ef33f42622ae4c5b3e8da63ac47903d69 Mon Sep 17 00:00:00 2001 From: Jana Cupova Date: May 24 2022 06:37:07 +0000 Subject: Order channels at hosts page Fixes: https://pagure.io/koji/issue/3367 --- diff --git a/www/kojiweb/index.py b/www/kojiweb/index.py index b2da61c..de39ca7 100644 --- a/www/kojiweb/index.py +++ b/www/kojiweb/index.py @@ -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']: