COMPLEX SEARCH
This commit is contained in:
parent
924a688a9d
commit
745e175da4
@ -76,7 +76,7 @@ func (wfa storageMongoAccessor) LoadAll() ([]utils.ShallowDBObject, int, error)
|
||||
|
||||
func (wfa *storageMongoAccessor) Search(filters *dbs.Filters, search string) ([]utils.ShallowDBObject, int, error) {
|
||||
objs := []utils.ShallowDBObject{}
|
||||
if (len(filters.And) == 0 || len(filters.Or) == 0) && search != "" {
|
||||
if (filters == nil || len(filters.And) == 0 || len(filters.Or) == 0) && search != "" {
|
||||
filters = &dbs.Filters{
|
||||
Or: map[string]dbs.Filter{
|
||||
"abstractresource.abstractobject.name": {Operator: dbs.LIKE.String(), Value: search},
|
||||
|
Loading…
Reference in New Issue
Block a user