Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

PI-2575 nullable field fixes #4412

Merged
merged 1 commit into from
Nov 8, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -47,13 +47,13 @@ data class Defendant(

data class Offence(
val id: String,
val offenceDefinitionId: String,
val offenceDefinitionId: String? = null,
val offenceCode: String,
val offenceTitle: String,
val wording: String,
val offenceLegislation: String,
val listingNumber: Int,
val judicialResults: List<JudicialResult>,
val judicialResults: List<JudicialResult>? = emptyList(),
val plea: Plea? = null,
val verdict: Verdict? = null
)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -32,9 +32,9 @@ class Handler(
.flatMap { it.defendants }
.filter { defendant ->
defendant.offences.any { offence ->
offence.judicialResults.any { judicialResult ->
offence.judicialResults?.any { judicialResult ->
judicialResult.isConvictedResult == true && judicialResult.label == "Remanded in custody"
}
} ?: false
}
}
if (defendants.isEmpty()) {
Expand Down
Loading