light modification

This commit is contained in:
mr 2025-01-17 16:22:46 +01:00
parent c63a1fef6c
commit b85ca8674b
2 changed files with 1 additions and 2 deletions

View File

@ -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.abstractobject.name": {{Operator: dbs.LIKE.String(), Value: search}},
"abstractintanciatedresource.abstractresource.short_description": {{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.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}},
}, },
} }
} }

View File

@ -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) { func (a *ResourceModelMongoAccessor) Search(filters *dbs.Filters, search string, isDraft bool) ([]utils.ShallowDBObject, int, error) {
return utils.GenericSearch[*ResourceModel](filters, search, return utils.GenericSearch[*ResourceModel](filters, search,
&dbs.Filters{ &dbs.Filters{
Or: map[string][]dbs.Filter{ Or: map[string][]dbs.Filter{