Commit 5688944 1 parent 3d30528 commit 5688944 Copy full SHA for 5688944
File tree 2 files changed +6
-7
lines changed
src/main/kotlin/uk/gov/justice/digital/hmpps/hmppsintegrationapi/services
2 files changed +6
-7
lines changed Original file line number Diff line number Diff line change @@ -15,8 +15,8 @@ class GetInductionScheduleForPersonService(
15
15
fun execute (hmppsId : String ): Response <InductionSchedule > {
16
16
val response = getPersonService.getNomisNumber(hmppsId = hmppsId)
17
17
18
- // not a valid person
19
- if (response.errors.isNotEmpty()) {
18
+ // not a valid person
19
+ if (response.errors.isNotEmpty()) {
20
20
return Response (InductionSchedule (), response.errors)
21
21
}
22
22
@@ -28,15 +28,15 @@ class GetInductionScheduleForPersonService(
28
28
29
29
fun getHistory (hmppsId : String ): Response <InductionSchedules > {
30
30
val response = getPersonService.getNomisNumber(hmppsId = hmppsId)
31
- // not a valid person
32
- if (response.errors.isNotEmpty()) {
31
+ // not a valid person
32
+ if (response.errors.isNotEmpty()) {
33
33
return Response (InductionSchedules (listOf ()), response.errors)
34
34
}
35
- // found data will return it
35
+ // found data will return it
36
36
response.data?.nomisNumber?.let {
37
37
return plpGateway.getInductionScheduleHistory(it)
38
38
}
39
- // no data found return an empty list
39
+ // no data found return an empty list
40
40
return Response (InductionSchedules (listOf ()), response.errors)
41
41
}
42
42
}
Original file line number Diff line number Diff line change @@ -4,7 +4,6 @@ import org.springframework.beans.factory.annotation.Autowired
4
4
import org.springframework.stereotype.Service
5
5
import uk.gov.justice.digital.hmpps.hmppsintegrationapi.gateways.PrisonerOffenderSearchGateway
6
6
import uk.gov.justice.digital.hmpps.hmppsintegrationapi.gateways.ProbationOffenderSearchGateway
7
- import uk.gov.justice.digital.hmpps.hmppsintegrationapi.models.hmpps.HmppsId
8
7
import uk.gov.justice.digital.hmpps.hmppsintegrationapi.models.hmpps.NomisNumber
9
8
import uk.gov.justice.digital.hmpps.hmppsintegrationapi.models.hmpps.OffenderSearchResponse
10
9
import uk.gov.justice.digital.hmpps.hmppsintegrationapi.models.hmpps.Person
You can’t perform that action at this time.
0 commit comments