Fix receiver list
Receiver list doesn't work for cluster_id of receiver could be None now. This patch fixes it. Change-Id: If0eb5af896d8482cb819597988b6ef0dc6e16e09
This commit is contained in:
@@ -97,7 +97,7 @@ class ListReceiver(command.Lister):
|
||||
if not parsed_args.full_id:
|
||||
formatters = {
|
||||
'id': lambda x: x[:8],
|
||||
'cluster_id': lambda x: x[:8],
|
||||
'cluster_id': lambda x: x[:8] if x else None,
|
||||
}
|
||||
|
||||
return (
|
||||
|
||||
@@ -1335,7 +1335,7 @@ def do_receiver_list(service, args):
|
||||
if not args.full_id:
|
||||
formatters = {
|
||||
'id': lambda x: x.id[:8],
|
||||
'cluster_id': lambda x: x.cluster_id[:8],
|
||||
'cluster_id': lambda x: x.cluster_id[:8] if x.cluster_id else '-',
|
||||
}
|
||||
utils.print_list(receivers, fields, formatters=formatters,
|
||||
sortby_index=sortby_index)
|
||||
|
||||
Reference in New Issue
Block a user