Browse Source
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
master
Michael Drury
4 years ago
committed by
GitHub
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with
1 additions and
1 deletions
-
packages/server/src/api/controllers/view/exporters.js
|
|
@ -6,7 +6,7 @@ exports.csv = function (headers, rows) { |
|
|
.map(header => { |
|
|
.map(header => { |
|
|
let val = row[header] |
|
|
let val = row[header] |
|
|
val = |
|
|
val = |
|
|
typeof val === "object" |
|
|
typeof val === "object" && !(val instanceof Date) |
|
|
? `"${JSON.stringify(val).replace(/"/g, "'")}"` |
|
|
? `"${JSON.stringify(val).replace(/"/g, "'")}"` |
|
|
: `"${val}"` |
|
|
: `"${val}"` |
|
|
return val.trim() |
|
|
return val.trim() |
|
|
|