Commit 7439f1e2 authored by Jerome Touvier's avatar Jerome Touvier
Browse files

datetime not JSON serializable

parent e2b1f0ea
......@@ -175,6 +175,7 @@ def format_results(params, data):
for row in data:
if row[2]:
row[2] = format(row[2], ",") + f" ({humanize_size(row[2])})"
data = [[str(val) for val in row] for row in data]
return data
......@@ -205,7 +206,6 @@ def get_column_widths(data, header=None):
def records_to_text(params, data, sep=" "):
text = ""
header = get_header(params)
data = [[str(val) for val in row] for row in data]
if params["format"] == "text":
sizes = get_column_widths(data, header)
# pad header and rows according to the maximum column width
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment