Skip to content

Commit

Permalink
fix: recreate asker booking relation
Browse files Browse the repository at this point in the history
  • Loading branch information
tkuzynow committed Sep 8, 2023
1 parent 672d592 commit 64cf989
Showing 1 changed file with 7 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -104,6 +104,13 @@ List<CalcomBooking> enrichAskerResultSet(List<CalcomBooking> bookings) {
Optional<CalcomBookingToAsker> calcomBookingAsker = calcomBookingToAskerRepository
.findByCalcomBookingId(
booking.getId());
if (!calcomBookingAsker.isPresent()) {
log.warn("Inconsistent data. Asker not found for booking. Trying to fix consistency for bookingId " + booking.getId());
recreateBookingToAskerRelation(booking);
calcomBookingAsker = calcomBookingToAskerRepository
.findByCalcomBookingId(
booking.getId());
}
if (!calcomBookingAsker.isPresent()) {
log.error("Inconsistent data. Asker not found for booking + " + booking.getId());
continue;
Expand Down

0 comments on commit 64cf989

Please sign in to comment.