id on peer

This commit is contained in:
mr 2024-08-20 12:59:09 +02:00
parent 8751d36b34
commit 392cf1cf1a

View File

@ -93,10 +93,13 @@ func (wfa *workflowMongoAccessor) book(id string, realData *Workflow, execs []*w
return errors.New("no path found") return errors.New("no path found")
} }
res, code, _ := wfa.LoadOne(id) res, code, _ := wfa.LoadOne(id)
if code == 200 { if code != 200 {
return errors.New("could not load workflow") return errors.New("could not load workflow")
} }
r := res.(*Workflow) r := res.(*Workflow)
if realData.Schedule == nil && r.Schedule == nil {
return nil
}
g := r.Graph g := r.Graph
if realData.Graph != nil { if realData.Graph != nil {
g = realData.Graph g = realData.Graph