light modification

This commit is contained in:
mr 2025-01-21 14:10:07 +01:00
parent bf5a16f41b
commit 745bb58c59

View File

@ -1,6 +1,8 @@
package workflow package workflow
import ( import (
"fmt"
"cloud.o-forge.io/core/oc-lib/dbs" "cloud.o-forge.io/core/oc-lib/dbs"
"cloud.o-forge.io/core/oc-lib/logs" "cloud.o-forge.io/core/oc-lib/logs"
"cloud.o-forge.io/core/oc-lib/models/collaborative_area/shallow_collaborative_area" "cloud.o-forge.io/core/oc-lib/models/collaborative_area/shallow_collaborative_area"
@ -89,6 +91,7 @@ func (a *workflowMongoAccessor) share(realData *Workflow, delete bool, caller *t
// UpdateOne updates a workflow in the database // UpdateOne updates a workflow in the database
func (a *workflowMongoAccessor) UpdateOne(set utils.DBObject, id string) (utils.DBObject, int, error) { func (a *workflowMongoAccessor) UpdateOne(set utils.DBObject, id string) (utils.DBObject, int, error) {
// avoid the update if the schedule is the same // avoid the update if the schedule is the same
fmt.Println(len(set.(*Workflow).Graph.Links))
res, code, err := utils.GenericUpdateOne(set, id, a, &Workflow{}) res, code, err := utils.GenericUpdateOne(set, id, a, &Workflow{})
if code != 200 { if code != 200 {
return nil, code, err return nil, code, err