Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
  • Loading branch information
anthony-britton-moj authored Nov 15, 2023
1 parent 0975bd3 commit 8db4552
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -49,6 +49,7 @@ object ProbationCaseGenerator {
nationality: ReferenceData? = null,
religion: ReferenceData? = null,
genderIdentity: ReferenceData? = null,
genderIdentityDescription: String? = null,
currentExclusion: Boolean = false,
currentRestriction: Boolean = false,
softDeleted: Boolean = false,
Expand All @@ -67,6 +68,7 @@ object ProbationCaseGenerator {
nationality,
religion,
genderIdentity,
genderIdentityDescription,
currentExclusion,
currentRestriction,
listOf(),
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -64,6 +64,8 @@ class ProbationCase(
@JoinColumn(name = "gender_identity_id")
val genderIdentity: ReferenceData?,

val genderIdentityDescription: String?,

@Column(columnDefinition = "number")
val currentExclusion: Boolean?,

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -60,7 +60,7 @@ fun CaseSummary.withDetail(offences: List<CaseOffence>, registrations: List<Regi

fun ProbationCase.name() = Name(forename, surname, listOfNotNull(secondName, thirdName))
fun ProbationCase.profile() =
Profile(ethnicity?.description, genderIdentity?.description, nationality?.description, religion?.description)
Profile(ethnicity?.description, genderIdentityDescription ?: genderIdentity?.description, nationality?.description, religion?.description)

fun ProbationCase.manager(): Manager =
with(currentManager()) {
Expand Down

0 comments on commit 8db4552

Please sign in to comment.