Fix lazy booking load in doc city update
All checks were successful
build-and-deploy / build-deploy (push) Successful in 32s
All checks were successful
build-and-deploy / build-deploy (push) Successful in 32s
This commit is contained in:
@@ -427,7 +427,8 @@ class DocumentExtractionService(
|
||||
}
|
||||
|
||||
private fun applyBookingCityUpdates(document: GuestDocument, results: Map<String, String>) {
|
||||
val booking = document.booking
|
||||
val bookingId = document.booking?.id ?: return
|
||||
val booking = bookingRepo.findById(bookingId).orElse(null) ?: return
|
||||
if (booking.fromCity?.isNotBlank() == true && booking.toCity?.isNotBlank() == true) return
|
||||
val pin = cleanedValue(results[DocumentPrompts.PIN_CODE.first]) ?: return
|
||||
if (!isValidPin(pin)) return
|
||||
|
||||
Reference in New Issue
Block a user