Skip to content

Commit 1fd221e

Browse files
authoredFeb 20, 2022
fix(export-campaign): fix attemptedAt being empty in export (#1083)
Luxon DateTime was unable to properly parse a valid datetime object, falling back to parsing with node Date, works better since the ORM returns a valid date type object, and not a string Fixed #1068
1 parent 74a692c commit 1fd221e

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed
 

‎src/server/tasks/export-campaign.ts

+1-1
Original file line numberDiff line numberDiff line change
@@ -291,7 +291,7 @@ export const processMessagesChunk = async (
291291
numMedia: message.num_media,
292292
sendStatus: message.send_status,
293293
errorCodes: message.error_codes,
294-
attemptedAt: DateTime.fromSQL(message.created_at).toISO(),
294+
attemptedAt: DateTime.fromJSDate(new Date(message.created_at)).toISO(),
295295
text: message.text,
296296
campaignId,
297297
"texter[firstName]": message.first_name,

0 commit comments

Comments
 (0)
Please sign in to comment.