Merge "Fix receiver list"

This commit is contained in:
Jenkins
2016-09-06 10:04:37 +00:00
committed by Gerrit Code Review
2 changed files with 2 additions and 2 deletions

View File

@@ -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 (

View File

@@ -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)