New
This commit is contained in:
@@ -94,7 +94,7 @@ func (a *workflowMongoAccessor) share(realData *Workflow, delete bool, caller *t
|
||||
// UpdateOne updates a workflow in the database
|
||||
func (a *workflowMongoAccessor) UpdateOne(set map[string]interface{}, id string) (utils.DBObject, int, error) {
|
||||
// avoid the update if the schedule is the same
|
||||
res, code, err := utils.GenericUpdateOne(set, id, a, &Workflow{})
|
||||
res, code, err := utils.GenericUpdateOne(set, id, a)
|
||||
if code != 200 {
|
||||
return nil, code, err
|
||||
}
|
||||
@@ -102,7 +102,7 @@ func (a *workflowMongoAccessor) UpdateOne(set map[string]interface{}, id string)
|
||||
if res.(*Workflow).Graph != nil && res.(*Workflow).Graph.Partial {
|
||||
return nil, 403, errors.New("you are not allowed to update a partial workflow")
|
||||
}
|
||||
res, code, err = utils.GenericUpdateOne(res.Serialize(res), id, a, &Workflow{})
|
||||
res, code, err = utils.GenericUpdateOne(res.Serialize(res), id, a)
|
||||
if code != 200 {
|
||||
return nil, code, err
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user