Fix issues caused by invalid xsd:dateTime values

Invalid dateTime strings were saved in the DB as NaN causing uncaught
exception in CSV download.
This commit is contained in:
Zaid Abdulla committed 2022-03-11 11:42:10 -08:00
1 parent 2b37f11e2e
commit 4b533d0aad
2 files changed
+2 -2

No files matched your search

+1 -1
View File
@@ -125,7 +125,7 @@ router.get(`/devices/:id.csv`, async (ctx) => {
new Date(p.objectTimestamp).toJSON(),
p.writable,
new Date(p.writableTimestamp).toJSON(),
`"${value.toString().replace(/"/g, '""')}"`,
`"${String(value).replace(/"/g, '""')}"`,
type,
new Date(p.valueTimestamp).toJSON(),
p.notification,