2
0
mirror of https://github.com/xcat2/confluent.git synced 2024-11-22 09:32:21 +00:00

Fix ordering without custom field list

The order argument only had any meaning when used in custom fields.
Add a loop in the custom field agnostic section of the code to correct
the behavior.
This commit is contained in:
Jarrod Johnson 2018-11-09 08:32:28 -05:00
parent 6fc305d6a0
commit 199a948b33

View File

@ -203,10 +203,12 @@ def list_discovery(options, session):
for cdt in columnmapping:
if cdt.lower() == field.lower():
columns.append(cdt)
if options.order and options.order.lower() == cdt.lower():
orderby = cdt
else:
columns = defcolumns
if options.order:
for field in columns:
if options.order.lower() == field.lower():
orderby = field
if options.csv:
csv.writer(sys.stdout).writerow(columns)
else: