Skip to content

Commit

Permalink
PI-2625 Handle null location change date
Browse files Browse the repository at this point in the history
  • Loading branch information
marcus-bcl committed Nov 19, 2024
1 parent b08717d commit 9f43132
Showing 1 changed file with 1 addition and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -79,4 +79,4 @@ fun PrisonerMovement.statusDateValid(custody: Custody): Boolean =
occurredAt <= ZonedDateTime.now() && occurredAt.toLocalDate() >= custody.statusChangeDate

fun PrisonerMovement.locationDateValid(custody: Custody): Boolean =
occurredAt <= ZonedDateTime.now() && occurredAt.toLocalDate() >= custody.locationChangeDate
occurredAt <= ZonedDateTime.now() && (custody.locationChangeDate == null || occurredAt.toLocalDate() >= custody.locationChangeDate)

0 comments on commit 9f43132

Please sign in to comment.