This commit is contained in:
mr
2026-03-04 13:51:43 +01:00
parent 5d18512f67
commit 2bfcfb5736
8 changed files with 16 additions and 16 deletions

View File

@@ -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
}