debug automation workspace
This commit is contained in:
parent
b06193add2
commit
18d54cdb8f
@ -50,9 +50,14 @@ func (wfa *WorkspaceMongoAccessor) LoadOne(id string) (utils.DBObject, int, erro
|
||||
return nil, code, err
|
||||
}
|
||||
res_mongo.Decode(&workflow)
|
||||
obj := &Workspace{Active: false}
|
||||
mongo.MONGOService.UpdateMultiple(obj, map[string]interface{}{"active": true}, wfa.GetType())
|
||||
obj = &Workspace{Active: true}
|
||||
results, _, err := wfa.LoadAll()
|
||||
if err == nil && len(results) > 0 {
|
||||
for _, r := range results {
|
||||
r.(*Workspace).Active = false
|
||||
wfa.UpdateOne(&Workspace{Active: false}, r.GetID())
|
||||
}
|
||||
}
|
||||
obj := &Workspace{Active: true}
|
||||
wfa.UpdateOne(obj, id)
|
||||
|
||||
if workflow.Datas != nil && len(workflow.Datas) > 0 {
|
||||
|
Loading…
Reference in New Issue
Block a user