nil except
This commit is contained in:
parent
b125c9be01
commit
ed4cb943a8
@ -103,11 +103,12 @@ func (wfa *workflowMongoAccessor) execute(workflow *Workflow) {
|
||||
accessor := (&workspace.Workspace{}).GetAccessor()
|
||||
filters := &dbs.Filters{
|
||||
Or: map[string]dbs.Filter{
|
||||
"abstractobject.name": {Operator: dbs.LIKE.String(), Value: workflow.Name + "_workspace"},
|
||||
"abstractobject.name": {dbs.LIKE.String(), workflow.Name + "_workspace"},
|
||||
},
|
||||
}
|
||||
resource, _, err := accessor.Search(filters, "")
|
||||
if err == nil && len(resource) == 1 {
|
||||
fmt.Println(resource)
|
||||
if err == nil && len(resource) > 0 {
|
||||
accessor.UpdateOne(&workspace.Workspace{
|
||||
Active: true,
|
||||
ResourceSet: resources.ResourceSet{
|
||||
|
@ -11,6 +11,7 @@ import (
|
||||
type Workspace struct {
|
||||
utils.AbstractObject
|
||||
resources.ResourceSet
|
||||
IsContextual bool `json:"is_contextual" bson:"is_contextual" default:"false"`
|
||||
Active bool `json:"active" bson:"active" default:"false"`
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user