Skip to content

Commit e218c23

Browse files
committed
Clearer logic.
1 parent aee65e9 commit e218c23

File tree

1 file changed

+3
-5
lines changed

1 file changed

+3
-5
lines changed

src/main/kotlin/no/nav/klage/oppgave/service/MottakService.kt

+3-5
Original file line numberDiff line numberDiff line change
@@ -353,11 +353,9 @@ class MottakService(
353353
type = type,
354354
)
355355

356-
return if (potentialDuplicate.isNotEmpty()) {
357-
!potentialDuplicate.all {
358-
it.utfall in listOf(Utfall.RETUR, Utfall.OPPHEVET)
359-
}
360-
} else false
356+
return (potentialDuplicate.any {
357+
it.utfall !in listOf(Utfall.RETUR, Utfall.OPPHEVET)
358+
})
361359
}
362360

363361
private fun validateOptionalDateTimeNotInFuture(inputDateTime: LocalDateTime?, parameterName: String) {

0 commit comments

Comments
 (0)