Skip to content

Commit

Permalink
PI-2653 Ignore temporary absence movements with no toAgency/fromAgency (
Browse files Browse the repository at this point in the history
  • Loading branch information
marcus-bcl authored Nov 20, 2024
1 parent 30ab577 commit 85aacfe
Showing 1 changed file with 2 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -168,15 +168,15 @@ fun Booking.prisonerMovement(movement: Movement): PrisonerMovement {
Booking.InOutStatus.IN -> PrisonerMovement.Received(
personReference,
movement.fromAgency,
movement.toAgency!!,
movement.toAgency ?: throw IgnorableMessageException("TemporaryAbsenceNoAgency"),
PrisonerMovement.Type.valueOf(reason),
movement.movementReason,
dateTime
)

Booking.InOutStatus.OUT -> PrisonerMovement.Released(
personReference,
movement.fromAgency!!,
movement.fromAgency ?: throw IgnorableMessageException("TemporaryAbsenceNoAgency"),
movement.toAgency,
PrisonerMovement.Type.valueOf(reason),
movement.movementReason,
Expand Down

0 comments on commit 85aacfe

Please sign in to comment.