workflow scheduler create booking with a booking execution lot id
This commit is contained in:
@@ -1,6 +1,7 @@
|
||||
package booking
|
||||
|
||||
import (
|
||||
"errors"
|
||||
"time"
|
||||
|
||||
"cloud.o-forge.io/core/oc-lib/dbs"
|
||||
@@ -33,7 +34,11 @@ func (a *bookingMongoAccessor) DeleteOne(id string) (utils.DBObject, int, error)
|
||||
}
|
||||
|
||||
func (a *bookingMongoAccessor) UpdateOne(set utils.DBObject, id string) (utils.DBObject, int, error) {
|
||||
return utils.GenericUpdateOne(set, id, a, &Booking{})
|
||||
if set.(*Booking).State == 0 {
|
||||
return nil, 400, errors.New("state is required")
|
||||
}
|
||||
realSet := &Booking{State: set.(*Booking).State}
|
||||
return utils.GenericUpdateOne(realSet, id, a, &Booking{})
|
||||
}
|
||||
|
||||
func (a *bookingMongoAccessor) StoreOne(data utils.DBObject) (utils.DBObject, int, error) {
|
||||
|
Reference in New Issue
Block a user