Skip to content

Commit e0286bb

Browse files
update allocation csv test
1 parent 5aae094 commit e0286bb

File tree

2 files changed

+2
-3
lines changed

2 files changed

+2
-3
lines changed

projects/workforce-allocations-to-delius/src/main/kotlin/uk/gov/justice/digital/hmpps/integrations/delius/allocations/InitialAllocation.kt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -37,7 +37,7 @@ interface InitialAllocation {
3737
val allocationDate: LocalDate
3838

3939
@get:JsonFormat(shape = STRING, pattern = "dd/MM/yyyy")
40-
val endDate: LocalDate
40+
val endDate: LocalDate?
4141
val officerCode: String
4242
val teamCode: String
4343
val teamDescription: String

projects/workforce-allocations-to-delius/src/main/kotlin/uk/gov/justice/digital/hmpps/service/InitialAllocationService.kt

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -6,13 +6,12 @@ import uk.gov.justice.digital.hmpps.config.CsvMapperConfig.csvMapper
66
import uk.gov.justice.digital.hmpps.integrations.delius.allocations.InitialAllocation
77
import uk.gov.justice.digital.hmpps.integrations.delius.allocations.InitialAllocationRepository
88
import java.io.OutputStream
9-
import kotlin.streams.asSequence
109

1110
@Service
1211
class InitialAllocationService(private val initialAllocationRepository: InitialAllocationRepository) {
1312
@Transactional
1413
fun writeInitialAllocations(outputStream: OutputStream) {
15-
val results = initialAllocationRepository.findAllInitialAllocations().asSequence()
14+
val results = initialAllocationRepository.findAllInitialAllocations()
1615
csvMapper
1716
.writer(csvMapper.schemaFor(InitialAllocation::class.java).withHeader())
1817
.writeValues(outputStream.bufferedWriter())

0 commit comments

Comments
 (0)