From 84024a143e670389b2e5818ac4d070dd13c2b187 Mon Sep 17 00:00:00 2001 From: mr Date: Wed, 9 Oct 2024 13:19:31 +0200 Subject: [PATCH] resource are lightest enough --- models/resources/data/data_mongo_accessor.go | 4 ++-- models/resources/datacenter/datacenter_mongo_accessor.go | 4 ++-- models/resources/processing/processing_mongo_accessor.go | 4 ++-- models/resources/storage/storage_mongo_accessor.go | 4 ++-- models/resources/workflow/workflow_mongo_accessor.go | 4 ++-- 5 files changed, 10 insertions(+), 10 deletions(-) diff --git a/models/resources/data/data_mongo_accessor.go b/models/resources/data/data_mongo_accessor.go index 5401e36..7757e2a 100644 --- a/models/resources/data/data_mongo_accessor.go +++ b/models/resources/data/data_mongo_accessor.go @@ -71,7 +71,7 @@ func (wfa dataMongoAccessor) LoadAll() ([]utils.ShallowDBObject, int, error) { if err == nil && len(resources) > 0 { r.ResourceModel = resources[0].(*resource_model.ResourceModel) } - objs = append(objs, &r.AbstractResource) // only get the abstract resource ! + objs = append(objs, &r) // only get the abstract resource ! } return objs, 200, nil } @@ -104,7 +104,7 @@ func (wfa *dataMongoAccessor) Search(filters *dbs.Filters, search string) ([]uti if err == nil && len(resources) > 0 { r.ResourceModel = resources[0].(*resource_model.ResourceModel) } - objs = append(objs, &r.AbstractResource) // only get the abstract resource ! + objs = append(objs, &r) // only get the abstract resource ! } return objs, 200, nil } diff --git a/models/resources/datacenter/datacenter_mongo_accessor.go b/models/resources/datacenter/datacenter_mongo_accessor.go index e3c7648..d827c9d 100644 --- a/models/resources/datacenter/datacenter_mongo_accessor.go +++ b/models/resources/datacenter/datacenter_mongo_accessor.go @@ -73,7 +73,7 @@ func (wfa datacenterMongoAccessor) LoadAll() ([]utils.ShallowDBObject, int, erro if err == nil && len(resources) > 0 { r.ResourceModel = resources[0].(*resource_model.ResourceModel) } - objs = append(objs, &r.AbstractResource) // only get the abstract resource ! + objs = append(objs, &r) // only get the abstract resource ! } return objs, 200, nil } @@ -106,7 +106,7 @@ func (wfa *datacenterMongoAccessor) Search(filters *dbs.Filters, search string) if err == nil && len(resources) > 0 { r.ResourceModel = resources[0].(*resource_model.ResourceModel) } - objs = append(objs, &r.AbstractResource) // only get the abstract resource ! + objs = append(objs, &r) // only get the abstract resource ! } return objs, 200, nil } diff --git a/models/resources/processing/processing_mongo_accessor.go b/models/resources/processing/processing_mongo_accessor.go index bc06546..c08eea9 100644 --- a/models/resources/processing/processing_mongo_accessor.go +++ b/models/resources/processing/processing_mongo_accessor.go @@ -74,7 +74,7 @@ func (wfa processingMongoAccessor) LoadAll() ([]utils.ShallowDBObject, int, erro if err == nil && len(resources) > 0 { r.ResourceModel = resources[0].(*resource_model.ResourceModel) } - objs = append(objs, &r.AbstractResource) // only get the abstract resource ! + objs = append(objs, &r) // only get the abstract resource ! } return objs, 200, nil } @@ -108,7 +108,7 @@ func (wfa *processingMongoAccessor) Search(filters *dbs.Filters, search string) if err == nil && len(resources) > 0 { r.ResourceModel = resources[0].(*resource_model.ResourceModel) } - objs = append(objs, &r.AbstractResource) // only get the abstract resource ! + objs = append(objs, &r) // only get the abstract resource ! } return objs, 200, nil } diff --git a/models/resources/storage/storage_mongo_accessor.go b/models/resources/storage/storage_mongo_accessor.go index 5df158d..a98e060 100644 --- a/models/resources/storage/storage_mongo_accessor.go +++ b/models/resources/storage/storage_mongo_accessor.go @@ -74,7 +74,7 @@ func (wfa storageMongoAccessor) LoadAll() ([]utils.ShallowDBObject, int, error) if err == nil && len(resources) > 0 { r.ResourceModel = resources[0].(*resource_model.ResourceModel) } - objs = append(objs, &r.AbstractResource) // only get the abstract resource ! + objs = append(objs, &r) // only get the abstract resource ! } return objs, 200, nil } @@ -108,7 +108,7 @@ func (wfa *storageMongoAccessor) Search(filters *dbs.Filters, search string) ([] if err == nil && len(resources) > 0 { r.ResourceModel = resources[0].(*resource_model.ResourceModel) } - objs = append(objs, &r.AbstractResource) // only get the abstract resource ! + objs = append(objs, &r) // only get the abstract resource ! } return objs, 200, nil } diff --git a/models/resources/workflow/workflow_mongo_accessor.go b/models/resources/workflow/workflow_mongo_accessor.go index 01c7f9d..bb02074 100644 --- a/models/resources/workflow/workflow_mongo_accessor.go +++ b/models/resources/workflow/workflow_mongo_accessor.go @@ -73,7 +73,7 @@ func (wfa workflowResourceMongoAccessor) LoadAll() ([]utils.ShallowDBObject, int if err == nil && len(resources) > 0 { r.ResourceModel = resources[0].(*resource_model.ResourceModel) } - objs = append(objs, &r.AbstractResource) + objs = append(objs, &r) } return objs, 200, nil } @@ -107,7 +107,7 @@ func (wfa *workflowResourceMongoAccessor) Search(filters *dbs.Filters, search st if err == nil && len(resources) > 0 { r.ResourceModel = resources[0].(*resource_model.ResourceModel) } - objs = append(objs, &r.AbstractResource) + objs = append(objs, &r) } return objs, 200, nil }