From 8bc2e4112f1b26e749ba02ba4e18a9b361d8e9aa Mon Sep 17 00:00:00 2001 From: Cody Seibert Date: Wed, 2 Oct 2024 12:11:53 -0400 Subject: [PATCH] 10391 - making mapper use optional fields --- web-api/src/persistence/postgres/messages/mapper.ts | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/web-api/src/persistence/postgres/messages/mapper.ts b/web-api/src/persistence/postgres/messages/mapper.ts index f878e3a196f..de02d27ec7a 100644 --- a/web-api/src/persistence/postgres/messages/mapper.ts +++ b/web-api/src/persistence/postgres/messages/mapper.ts @@ -58,9 +58,9 @@ export function messageResultEntity(message) { ...message, caseStatus: message.status, caseTitle: Case.getCaseTitle(message.caption || ''), - completedAt: message.completedAt.toISOString(), + completedAt: message.completedAt?.toISOString(), createdAt: message.createdAt.toISOString(), - trialDate: message.trialDate.toISOString(), + trialDate: message.trialDate?.toISOString(), }), ); }