From 09fb9d897c83ae41f0789a7e71d6ee318e3e68b2 Mon Sep 17 00:00:00 2001 From: Thomas Gran Date: Tue, 14 Jan 2025 19:47:59 +0100 Subject: [PATCH] fix: The bookWhen field is null in the Transmodel API #6384 --- .../apis/transmodel/model/timetable/BookingArrangementType.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/application/src/main/java/org/opentripplanner/apis/transmodel/model/timetable/BookingArrangementType.java b/application/src/main/java/org/opentripplanner/apis/transmodel/model/timetable/BookingArrangementType.java index 727dc37d99b..911ec8d9b0c 100644 --- a/application/src/main/java/org/opentripplanner/apis/transmodel/model/timetable/BookingArrangementType.java +++ b/application/src/main/java/org/opentripplanner/apis/transmodel/model/timetable/BookingArrangementType.java @@ -109,7 +109,7 @@ public static GraphQLObjectType create() { .type(EnumTypes.PURCHASE_WHEN) .dataFetcher(environment -> { BookingInfo bookingInfo = bookingInfo(environment); - if (bookingInfo.getMinimumBookingNotice() != null) { + if (bookingInfo.getMinimumBookingNotice().isPresent()) { return null; } BookingTime latestBookingTime = bookingInfo.getLatestBookingTime();