From 160bd5c12ae8f543f24fc6baf3a21688507ce138 Mon Sep 17 00:00:00 2001 From: Anthony Britton Date: Mon, 18 Sep 2023 13:21:43 +0100 Subject: [PATCH] update noms id to be nullable when searching by crn --- .../uk/gov/justice/digital/hmpps/api/model/ProbationRecord.kt | 2 +- .../digital/hmpps/services/mapping/ProbationRecordMapping.kt | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/projects/manage-pom-cases-and-delius/src/main/kotlin/uk/gov/justice/digital/hmpps/api/model/ProbationRecord.kt b/projects/manage-pom-cases-and-delius/src/main/kotlin/uk/gov/justice/digital/hmpps/api/model/ProbationRecord.kt index 09f09cb08e..d75b5c22a5 100644 --- a/projects/manage-pom-cases-and-delius/src/main/kotlin/uk/gov/justice/digital/hmpps/api/model/ProbationRecord.kt +++ b/projects/manage-pom-cases-and-delius/src/main/kotlin/uk/gov/justice/digital/hmpps/api/model/ProbationRecord.kt @@ -2,7 +2,7 @@ package uk.gov.justice.digital.hmpps.api.model data class ProbationRecord( val crn: String, - val nomsId: String, + val nomsId: String?, val currentTier: String?, val resourcing: Resourcing?, val manager: Manager, diff --git a/projects/manage-pom-cases-and-delius/src/main/kotlin/uk/gov/justice/digital/hmpps/services/mapping/ProbationRecordMapping.kt b/projects/manage-pom-cases-and-delius/src/main/kotlin/uk/gov/justice/digital/hmpps/services/mapping/ProbationRecordMapping.kt index 1694a7e656..1cfc7b8f93 100644 --- a/projects/manage-pom-cases-and-delius/src/main/kotlin/uk/gov/justice/digital/hmpps/services/mapping/ProbationRecordMapping.kt +++ b/projects/manage-pom-cases-and-delius/src/main/kotlin/uk/gov/justice/digital/hmpps/services/mapping/ProbationRecordMapping.kt @@ -15,7 +15,7 @@ import uk.gov.justice.digital.hmpps.integrations.delius.reference.entity.Referen fun Person.record(decision: ReferenceData?, registration: Registration?, vloAssigned: Boolean): ProbationRecord = ProbationRecord( crn, - nomsId!!, + nomsId, currentTier?.description, decision?.resourcing(), manager.manager(),