mirror of
https://github.com/pgadmin-org/pgadmin4.git
synced 2025-02-25 18:55:31 -06:00
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:
committed by
Akshay Joshi
parent
b9b0a573e5
commit
e3190b86ab
@@ -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'
|
||||
|
||||
Reference in New Issue
Block a user