Skip to content

Commit

Permalink
SDIT-1816 Fix bug sending created by instead of modified by (#689)
Browse files Browse the repository at this point in the history
  • Loading branch information
mikehalmamoj committed Jul 1, 2024
1 parent 97c7e65 commit 43e5a4a
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,7 @@ class PrisonPersonSynchronisationService(
booking.startDateTime.toLocalDateTime(),
booking.endDateTime?.toLocalDateTime(),
(physicalAttributes.modifiedDateTime ?: physicalAttributes.createDateTime).toLocalDateTime(),
physicalAttributes.createdBy,
physicalAttributes.modifiedDateTime?.let { physicalAttributes.modifiedBy } ?: physicalAttributes.createdBy,
)
} catch (e: Exception) {
telemetry["error"] = e.message.toString()
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -160,6 +160,7 @@ class PrisonPersonSyncIntTest : SqsIntegrationTestBase() {
weightKilograms = 80,
createDateTime = "${now.minusDays(3)}",
modifiedDateTime = "${now.minusDays(1)}",
modifiedBy = "MODIFY_USER",
),
aPhysicalAttributesResponse(
attributeSequence = 2,
Expand All @@ -182,6 +183,8 @@ class PrisonPersonSyncIntTest : SqsIntegrationTestBase() {
dpsUpdates = mapOf(
"height" to equalTo("180"),
"weight" to equalTo("80"),
"createdAt" to equalTo("${now.minusDays(1).toZoned()}"),
"createdBy" to equalTo("MODIFY_USER"),
),
)
}
Expand Down

0 comments on commit 43e5a4a

Please sign in to comment.