From 25eefb5ed7b5ee973415ba664f1ab35105135eec Mon Sep 17 00:00:00 2001 From: Ivan Trujillo Ayala Date: Thu, 29 Feb 2024 15:46:25 -0600 Subject: [PATCH] Bugfix * This fixes a bug that when a participant is stored it stored itas a string and not an object --- .../api/assessmentDayDataController/index.js | 12 +++++++++++- 1 file changed, 11 insertions(+), 1 deletion(-) diff --git a/server/controllers/api/assessmentDayDataController/index.js b/server/controllers/api/assessmentDayDataController/index.js index 8528509f..1ebe5b18 100644 --- a/server/controllers/api/assessmentDayDataController/index.js +++ b/server/controllers/api/assessmentDayDataController/index.js @@ -73,7 +73,17 @@ const AssessmentDayDataController = { await SiteMetadataModel.upsert( appDb, { study }, - { $addToSet: { participants: participant } } + { + $addToSet: { + participants: { + Active: 1, + Consent: new Date(), + study, + participant, + synced: new Date(), + }, + }, + } ) } }