Merge branch 'main' of https://cloud.o-forge.io/core/oc-lib into main
test
This commit is contained in:
commit
6ab774cc43
@ -46,6 +46,7 @@ func (abs *PricedResource) IsPurchasable() bool {
|
||||
}
|
||||
|
||||
func (abs *PricedResource) IsBooked() bool {
|
||||
return true // For dev purposes, prevent that DB objects that don't have a Pricing are considered as not booked
|
||||
if abs.SelectedPricing == nil {
|
||||
return false
|
||||
}
|
||||
|
@ -49,7 +49,7 @@ func GenericStoreOne(data DBObject, a Accessor) (DBObject, int, error) {
|
||||
}
|
||||
err := validate.Struct(data)
|
||||
if err != nil {
|
||||
return nil, 422, err
|
||||
return nil, 422, errors.New("error when validating the received struct: " + err.Error())
|
||||
}
|
||||
id, code, err := mongo.MONGOService.StoreOne(data, data.GetID(), a.GetType().String())
|
||||
if err != nil {
|
||||
|
Loading…
Reference in New Issue
Block a user