mirror of
https://github.com/ansible/awx.git
synced 2026-01-20 22:18:01 -03:30
Sort instance groups by name regardless of upper/lower case
This commit is contained in:
parent
2090e46ac2
commit
41a6473782
@ -166,7 +166,7 @@ class ApiV2PingView(APIView):
|
||||
response['instance_groups'].append(
|
||||
dict(name=instance_group.name, capacity=instance_group.capacity, instances=[x.hostname for x in instance_group.instances.all()])
|
||||
)
|
||||
response['instance_groups'] = sorted(response['instance_groups'], key=operator.itemgetter('name'))
|
||||
response['instance_groups'] = sorted(response['instance_groups'], key=lambda x: x['name'].lower())
|
||||
return Response(response)
|
||||
|
||||
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user