Sort networks and projects by name instead of UUID
Change-Id: I73b9f05303917300121ed99042cdd5004184261b Closes-Bug: 1375206
This commit is contained in:
parent
35487bf8a0
commit
302cfccb99
|
@ -677,6 +677,7 @@ class SetNetworkAction(workflows.Action):
|
|||
for n in networks:
|
||||
n.set_id_as_name_if_empty()
|
||||
network_list.append((n.id, n.name))
|
||||
sorted(network_list, key=lambda obj: obj[1])
|
||||
except Exception:
|
||||
exceptions.handle(request,
|
||||
_('Unable to retrieve networks.'))
|
||||
|
|
|
@ -66,7 +66,8 @@ def show_project_list(context):
|
|||
if 'request' not in context:
|
||||
return {}
|
||||
request = context['request']
|
||||
context = {'projects': sorted(context['authorized_tenants']),
|
||||
context = {'projects': sorted(context['authorized_tenants'],
|
||||
key=lambda project: project.name),
|
||||
'project_id': request.user.project_id,
|
||||
'request': request}
|
||||
return context
|
||||
|
|
Loading…
Reference in New Issue