Skip to content

Commit

Permalink
PI-2715 Handle null actionDesc in OASys assessment summary (#4522)
Browse files Browse the repository at this point in the history
  • Loading branch information
marcus-bcl authored Dec 31, 2024
1 parent dfa5dd2 commit 32240ff
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 4 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -141,7 +141,7 @@ data class Need(
)

data class Action(
val actionDesc: String,
val actionDesc: String?,
val actionComment: String?
)

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down

0 comments on commit 32240ff

Please sign in to comment.