Skip to content

Commit

Permalink
Merge branch 'main' into bug/PI-1939-mas-fix-clob-test-error
Browse files Browse the repository at this point in the history
  • Loading branch information
achimber-moj committed Mar 28, 2024
2 parents b8266e1 + 7e81b71 commit 304bbd6
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@ class Contact(
val date: LocalDate = LocalDate.now(),

@Column(name = "contact_start_time")
val startTime: ZonedDateTime = ZonedDateTime.now(),
val startTime: ZonedDateTime? = ZonedDateTime.now(),

@Column(name = "rar_activity", length = 1)
@Convert(converter = YesNoConverter::class)
Expand Down Expand Up @@ -91,7 +91,7 @@ class Contact(
@Column(name = "soft_deleted", columnDefinition = "NUMBER", nullable = false)
val softDeleted: Boolean = false
) {
fun startDateTime(): ZonedDateTime = ZonedDateTime.of(date, startTime.toLocalTime(), EuropeLondon)
fun startDateTime(): ZonedDateTime = ZonedDateTime.of(date, startTime?.toLocalTime(), EuropeLondon)
fun endDateTime(): ZonedDateTime? =
if (endTime != null) ZonedDateTime.of(date, endTime.toLocalTime(), EuropeLondon) else null

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -51,7 +51,7 @@ internal class OverviewServiceTest {
val crn = "X000004"
val expectedAppointmentDateTime = ZonedDateTime.of(
FIRST_APPT_CONTACT.date,
FIRST_APPT_CONTACT.startTime.toLocalTime(),
FIRST_APPT_CONTACT.startTime?.toLocalTime(),
EuropeLondon
)
whenever(personRepository.findByCrn(crn)).thenReturn(PersonGenerator.OVERVIEW)
Expand Down

0 comments on commit 304bbd6

Please sign in to comment.