From 0feab329c13ad9bf96eb2ebd3b234c5128988d8c Mon Sep 17 00:00:00 2001 From: mr Date: Tue, 14 Jan 2025 08:32:15 +0100 Subject: [PATCH] add exec --- models/resources/resource_accessor.go | 3 +++ 1 file changed, 3 insertions(+) diff --git a/models/resources/resource_accessor.go b/models/resources/resource_accessor.go index 6cf9130..64d139a 100644 --- a/models/resources/resource_accessor.go +++ b/models/resources/resource_accessor.go @@ -62,6 +62,7 @@ func (dca *resourceMongoAccessor[T]) LoadOne(id string) (utils.DBObject, int, er d.(T).SetResourceModel(resources[0].(*resource_model.ResourceModel)) } d.(T).SetAllowedInstances(dca.Request) + d = d.(T).Transform() return d, 200, nil }, dca) } @@ -73,6 +74,7 @@ func (wfa *resourceMongoAccessor[T]) LoadAll(isDraft bool) ([]utils.ShallowDBObj d.(T).SetResourceModel(resources[0].(*resource_model.ResourceModel)) } d.(T).SetAllowedInstances(wfa.Request) + d = d.(T).Transform() return d }, isDraft, wfa) } @@ -85,6 +87,7 @@ func (wfa *resourceMongoAccessor[T]) Search(filters *dbs.Filters, search string, d.(T).SetResourceModel(resources[0].(*resource_model.ResourceModel)) } d.(T).SetAllowedInstances(wfa.Request) + d = d.(T).Transform() return d }, isDraft, wfa) }