diff --git a/projects/assessment-summary-and-delius/src/main/kotlin/uk/gov/justice/digital/hmpps/integrations/oasys/OrdsClient.kt b/projects/assessment-summary-and-delius/src/main/kotlin/uk/gov/justice/digital/hmpps/integrations/oasys/OrdsClient.kt index 802964df1..10a6ac953 100644 --- a/projects/assessment-summary-and-delius/src/main/kotlin/uk/gov/justice/digital/hmpps/integrations/oasys/OrdsClient.kt +++ b/projects/assessment-summary-and-delius/src/main/kotlin/uk/gov/justice/digital/hmpps/integrations/oasys/OrdsClient.kt @@ -141,7 +141,7 @@ data class Need( ) data class Action( - val actionDesc: String, + val actionDesc: String?, val actionComment: String? ) diff --git a/projects/assessment-summary-and-delius/src/main/kotlin/uk/gov/justice/digital/hmpps/service/AssessmentService.kt b/projects/assessment-summary-and-delius/src/main/kotlin/uk/gov/justice/digital/hmpps/service/AssessmentService.kt index 427ba375e..331858e29 100644 --- a/projects/assessment-summary-and-delius/src/main/kotlin/uk/gov/justice/digital/hmpps/service/AssessmentService.kt +++ b/projects/assessment-summary-and-delius/src/main/kotlin/uk/gov/justice/digital/hmpps/service/AssessmentService.kt @@ -112,9 +112,11 @@ fun Objective.plan( ) criminogenicNeeds.forEachIndexed { index, need -> sp.withNeed(index.deliusIndex(), need.criminogenicNeedDesc) } actions?.forEachIndexed { index, action -> - sp.withWorkSummary(index.deliusIndex(), action.actionDesc) - action.actionComment?.also { - sp.withText(index.deliusIndex(), it) + if (action.actionDesc != null) { + sp.withWorkSummary(index.deliusIndex(), action.actionDesc) + action.actionComment?.also { + sp.withText(index.deliusIndex(), it) + } } } return sp