Skip to content

Commit

Permalink
PI-1602 Save previous address after end-dating (#2466)
Browse files Browse the repository at this point in the history
  • Loading branch information
marcus-bcl authored Oct 31, 2023
1 parent 6560888 commit 1f11790
Showing 1 changed file with 2 additions and 1 deletion.
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
package uk.gov.justice.digital.hmpps.integrations.delius

import org.springframework.stereotype.Service
import org.springframework.transaction.annotation.Transactional
import uk.gov.justice.digital.hmpps.integrations.approvedpremesis.PersonArrived
import uk.gov.justice.digital.hmpps.integrations.delius.entity.AddressTypeCode
import uk.gov.justice.digital.hmpps.integrations.delius.entity.Person
Expand All @@ -14,6 +15,7 @@ import java.time.LocalDate
import java.time.ZonedDateTime

@Service
@Transactional
class AddressService(
private val personAddressRepository: PersonAddressRepository,
private val referenceDataRepository: ReferenceDataRepository
Expand All @@ -39,7 +41,6 @@ class AddressService(
val previousStatus = referenceDataRepository.previousAddressStatus()
currentMain.status = previousStatus
currentMain.endDate = endDate.toLocalDate()
personAddressRepository.save(currentMain)
}
}
}
Expand Down

0 comments on commit 1f11790

Please sign in to comment.