From e7e56d1859cd4e7f754d9a19703f86a78d22cd15 Mon Sep 17 00:00:00 2001 From: pb Date: Mon, 7 Jul 2025 16:30:29 +0200 Subject: [PATCH 1/2] commented the PricingProfile check for IsBooked --- models/resources/priced_resource.go | 1 + 1 file changed, 1 insertion(+) diff --git a/models/resources/priced_resource.go b/models/resources/priced_resource.go index 161be32..c479220 100755 --- a/models/resources/priced_resource.go +++ b/models/resources/priced_resource.go @@ -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 } From dcdc6ff1d965d85cc0e77f3160a77614b0309a12 Mon Sep 17 00:00:00 2001 From: pb Date: Tue, 8 Jul 2025 12:02:18 +0200 Subject: [PATCH 2/2] added more info in GenericStoreOne error generated by validate() --- models/utils/common.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/models/utils/common.go b/models/utils/common.go index 4e30b23..7259cc5 100755 --- a/models/utils/common.go +++ b/models/utils/common.go @@ -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 {