Merge branch 'main' of https://cloud.o-forge.io/core/oc-lib into main

test
This commit is contained in:
mr 2025-07-08 13:42:28 +02:00
commit 6ab774cc43
2 changed files with 2 additions and 1 deletions

View File

@ -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
}

View File

@ -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 {