1
0
Fork 0
mirror of synced 2024-08-18 03:21:29 +12:00

Merge pull request #5788 from Budibase/bug/sev3/export-postgresql-data-as-csv-from-budibase-and-import-again-with-datetime

Don't wrap dates in single quotes - PostgreSQL Export Import Date/Time fix
This commit is contained in:
Michael Drury 2022-05-11 14:50:12 +01:00 committed by GitHub
commit 9df0b61418

View file

@ -6,7 +6,7 @@ exports.csv = function (headers, rows) {
.map(header => {
let val = row[header]
val =
typeof val === "object"
typeof val === "object" && !(val instanceof Date)
? `"${JSON.stringify(val).replace(/"/g, "'")}"`
: `"${val}"`
return val.trim()