diff --git a/projects/court-case-and-delius/src/main/kotlin/uk/gov/justice/digital/hmpps/api/model/conviction/Conviction.kt b/projects/court-case-and-delius/src/main/kotlin/uk/gov/justice/digital/hmpps/api/model/conviction/Conviction.kt index 4c780c4e33..d0180052d9 100644 --- a/projects/court-case-and-delius/src/main/kotlin/uk/gov/justice/digital/hmpps/api/model/conviction/Conviction.kt +++ b/projects/court-case-and-delius/src/main/kotlin/uk/gov/justice/digital/hmpps/api/model/conviction/Conviction.kt @@ -32,7 +32,7 @@ data class Offence( val offenceCount: Long?, val tics: Long?, val verdict: String?, - val offenderId: Long, + val offenderId: Long?, val createdDatetime: LocalDateTime, val lastUpdatedDatetime: LocalDateTime, ) diff --git a/projects/court-case-and-delius/src/main/kotlin/uk/gov/justice/digital/hmpps/integrations/delius/service/ConvictionService.kt b/projects/court-case-and-delius/src/main/kotlin/uk/gov/justice/digital/hmpps/integrations/delius/service/ConvictionService.kt index 8d33b4ef02..1600d95986 100644 --- a/projects/court-case-and-delius/src/main/kotlin/uk/gov/justice/digital/hmpps/integrations/delius/service/ConvictionService.kt +++ b/projects/court-case-and-delius/src/main/kotlin/uk/gov/justice/digital/hmpps/integrations/delius/service/ConvictionService.kt @@ -64,7 +64,7 @@ class ConvictionService( disposal?.custody?.toCustody(), court?.toCourt(), toLatestOrSentencingCourtAppearanceOf(), - orderManagers.map { it.toOrderManager() } + orderManagers.stream().map { it.toOrderManager() }.toList() ) fun Event.toOffences(): List { @@ -122,7 +122,7 @@ class ConvictionService( offenceCount = offenceCount, tics = null, verdict = null, - offenderId = event.person.id, + offenderId = null, createdDatetime = created.toLocalDateTime(), lastUpdatedDatetime = updated.toLocalDateTime() )