Fixes bug with different fields in query and scan commands
Closes-bug: #1337274 Change-Id: Ic91228c3a78fc016ceb76d8ef2dad880d0784dbf
This commit is contained in:
parent
ec8315ad09
commit
b40e6f442e
|
@ -541,7 +541,12 @@ class ListCommand(MagnetoDBCommand, lister.Lister):
|
|||
pass
|
||||
|
||||
def setup_columns(self, info, parsed_args):
|
||||
_columns = len(info) > 0 and sorted(info[0].keys()) or []
|
||||
_columns = set()
|
||||
if len(info) > 0:
|
||||
for item in info:
|
||||
_columns = _columns.union(item.keys())
|
||||
else:
|
||||
_columns = []
|
||||
if not _columns:
|
||||
# clean the parsed_args.columns so that cliff will not break
|
||||
parsed_args.columns = []
|
||||
|
|
Loading…
Reference in New Issue