From b85ca8674b275cafaeb1687f1e54513c277c143a Mon Sep 17 00:00:00 2001 From: mr Date: Fri, 17 Jan 2025 16:22:46 +0100 Subject: [PATCH] light modification --- models/resources/resource_accessor.go | 2 +- .../resources/resource_model/resource_model_mongo_accessor.go | 1 - 2 files changed, 1 insertion(+), 2 deletions(-) diff --git a/models/resources/resource_accessor.go b/models/resources/resource_accessor.go index a1760c5..edcf8e9 100644 --- a/models/resources/resource_accessor.go +++ b/models/resources/resource_accessor.go @@ -98,7 +98,7 @@ func (abs *resourceMongoAccessor[T]) getResourceFilter(search string) *dbs.Filte "abstractintanciatedresource.abstractresource.abstractobject.name": {{Operator: dbs.LIKE.String(), Value: search}}, "abstractintanciatedresource.abstractresource.short_description": {{Operator: dbs.LIKE.String(), Value: search}}, "abstractintanciatedresource.abstractresource.description": {{Operator: dbs.LIKE.String(), Value: search}}, - "abstractintanciatedresource.abstractresource.owners": {{Operator: dbs.IN.String(), Value: search}}, + "abstractintanciatedresource.abstractresource.owners.name": {{Operator: dbs.LIKE.String(), Value: search}}, }, } } diff --git a/models/resources/resource_model/resource_model_mongo_accessor.go b/models/resources/resource_model/resource_model_mongo_accessor.go index d1b8bdd..f0186de 100644 --- a/models/resources/resource_model/resource_model_mongo_accessor.go +++ b/models/resources/resource_model/resource_model_mongo_accessor.go @@ -53,7 +53,6 @@ func (a *ResourceModelMongoAccessor) LoadAll(isDraft bool) ([]utils.ShallowDBObj } func (a *ResourceModelMongoAccessor) Search(filters *dbs.Filters, search string, isDraft bool) ([]utils.ShallowDBObject, int, error) { - return utils.GenericSearch[*ResourceModel](filters, search, &dbs.Filters{ Or: map[string][]dbs.Filter{