This commit is contained in:
mr
2026-02-19 09:43:44 +01:00
parent 0b41e2505e
commit 9662ac6d67
7 changed files with 17 additions and 15 deletions

View File

@@ -38,7 +38,7 @@ func (a *BookingMongoAccessor) UpdateOne(set utils.DBObject, id string) (utils.D
}
func (a *BookingMongoAccessor) LoadOne(id string) (utils.DBObject, int, error) {
return utils.GenericLoadOne[*Booking](id, func(d utils.DBObject) (utils.DBObject, int, error) {
return utils.GenericLoadOne[*Booking](id, a.New(), func(d utils.DBObject) (utils.DBObject, int, error) {
now := time.Now()
now = now.Add(time.Second * -60)
if d.(*Booking).State == enum.DRAFT && now.UTC().After(d.(*Booking).ExpectedStartDate) {