Fixed an issue where a decimal number is appended for character varying fields while downloading the data in CSV format. Fixes #6520

This commit is contained in:
Pradip Parkale
2021-06-11 19:29:20 +05:30
committed by Akshay Joshi
parent b9b0a573e5
commit e3190b86ab
4 changed files with 18 additions and 20 deletions

View File

@@ -1357,7 +1357,8 @@ def start_query_download_tool(trans_id):
try:
# This returns generator of records.
status, gen = sync_conn.execute_on_server_as_csv(records=2000)
status, gen, conn_obj = \
sync_conn.execute_on_server_as_csv(records=2000)
if not status:
return make_json_response(
@@ -1367,13 +1368,13 @@ def start_query_download_tool(trans_id):
)
r = Response(
gen(
gen(conn_obj,
trans_obj,
quote=blueprint.csv_quoting.get(),
quote_char=blueprint.csv_quote_char.get(),
field_separator=blueprint.csv_field_separator.get(),
replace_nulls_with=blueprint.replace_nulls_with.get()
),
),
mimetype='text/csv' if
blueprint.csv_field_separator.get() == ','
else 'text/plain'