diff --git a/dbs/mongo/mongo.go b/dbs/mongo/mongo.go index d218e02..d9dcba9 100644 --- a/dbs/mongo/mongo.go +++ b/dbs/mongo/mongo.go @@ -246,7 +246,7 @@ func (m *MongoDB) Search(search string, filter []string, collection_name string) targetDBCollection := CollectionMap[collection_name] list := []bson.M{} for _, k := range filter { - list = append(list, bson.M{k: bson.M{"$regex": search, "$options": 'i'}}) + list = append(list, bson.M{k: bson.M{"$regex": search, "$options": "i"}}) } MngoCtx, cancel = context.WithTimeout(context.Background(), 10*time.Second) defer cancel() @@ -254,8 +254,8 @@ func (m *MongoDB) Search(search string, filter []string, collection_name string) if cursor, err := targetDBCollection.Find( MngoCtx, bson.M{"$or": []bson.M{ - {"name": bson.M{"$regex": search, "$options": 'i'}}, - {"description": bson.M{"$regex": search, "$options": 'i'}}, + {"name": bson.M{"$regex": search, "$options": "i"}}, + {"description": bson.M{"$regex": search, "$options": "i"}}, }}, opts, ); err != nil { diff --git a/models/workflow_execution/workflow_execution.go b/models/workflow_execution/workflow_execution.go index 1009c78..3598d51 100644 --- a/models/workflow_execution/workflow_execution.go +++ b/models/workflow_execution/workflow_execution.go @@ -59,7 +59,7 @@ func (d *WorkflowExecution) GetName() string { func (d *WorkflowExecution) GetAccessor() utils.Accessor { data := &WorkflowExecutionMongoAccessor{} - data.SetLogger(utils.WORKFLOW) + data.SetLogger(utils.WORKFLOW_EXECUTION) return data }