Skip to content
This repository has been archived by the owner on Feb 27, 2024. It is now read-only.

Commit

Permalink
Adherence can be null for upload
Browse files Browse the repository at this point in the history
  • Loading branch information
nategbrown9 committed Nov 8, 2023
1 parent fc628fc commit b30f6cb
Showing 1 changed file with 4 additions and 5 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -43,8 +43,7 @@ class AssessmentResultArchiveUploader(
*/
fun archiveResultAndQueueUpload(assessmentResult: Result,
jsonCoder: Json,
assessmentInstanceId: String,
adherenceRecord: AdherenceRecord,
adherenceRecord: AdherenceRecord?,
assessmentResultFilename: String? = "assessmentResult.json") {

val archiver = AssessmentArchiver(
Expand All @@ -62,9 +61,9 @@ class AssessmentResultArchiveUploader(
}

val uploadMetadata = UploadMetadata(
instanceGuid = assessmentInstanceId,
eventTimestamp = adherenceRecord.eventTimestamp,
startedOn = adherenceRecord.startedOn?.toString()
instanceGuid = adherenceRecord?.instanceGuid,
eventTimestamp = adherenceRecord?.eventTimestamp,
startedOn = adherenceRecord?.startedOn?.toString()
)
val uploadFile = persist(assessmentRunUUID, archiver.buildArchive(), uploadMetadata)
Logger.i("UploadFile $uploadFile")
Expand Down

0 comments on commit b30f6cb

Please sign in to comment.