From fe8db2010917b18a59ca194f57bce0eeff8f8d38 Mon Sep 17 00:00:00 2001 From: Zdenek Devaty Date: Fri, 5 Apr 2024 07:56:25 +0200 Subject: [PATCH] Handle not yet synced to ELiona --- app.go | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/app.go b/app.go index e2f90e0..933c863 100644 --- a/app.go +++ b/app.go @@ -186,6 +186,10 @@ func collectResources(config apiserver.Configuration) error { if booking.ExchangeChangeKey.String != a.ExchangeChangeKey { // Booking has changed. + if !booking.BookingID.Valid { + // Booking not yet synced to Eliona + newBookings = append(newBookings, a) + } changedBookings = append(changedBookings, a) booking.ExchangeChangeKey = null.StringFrom(a.ExchangeChangeKey) err := conf.UpdateBooking(booking)