Skip to content

Commit 4afcdcd

Browse files
committed
PI-3011: Fixed hasOutcome flag
1 parent 925676d commit 4afcdcd

File tree

1 file changed

+5
-2
lines changed
  • projects/manage-supervision-and-delius/src/main/kotlin/uk/gov/justice/digital/hmpps/integrations/delius/overview/entity

1 file changed

+5
-2
lines changed

projects/manage-supervision-and-delius/src/main/kotlin/uk/gov/justice/digital/hmpps/integrations/delius/overview/entity/Contact.kt

+5-2
Original file line numberDiff line numberDiff line change
@@ -121,8 +121,11 @@ class Contact(
121121
fun endDateTime(): ZonedDateTime? =
122122
if (endTime != null) ZonedDateTime.of(date, endTime.toLocalTime(), EuropeLondon) else null
123123

124-
fun shouldHaveOutcomeRecorded(): Boolean {
125-
return outcome != null && type.contactOutcomeFlag == true
124+
fun shouldHaveOutcomeRecorded(): Boolean? {
125+
if(type.contactOutcomeFlag != true){
126+
return null
127+
}
128+
return outcome == null
126129
}
127130

128131
fun isInitial(): Boolean = setOf(

0 commit comments

Comments
 (0)