id on peer
This commit is contained in:
parent
9e795d795c
commit
8751d36b34
@ -53,6 +53,9 @@ func (m *MongoDB) Init(collections []string, config MongoConf) {
|
||||
}
|
||||
|
||||
func (m *MongoDB) createClient(MongoURL string) error {
|
||||
if mngoClient != nil {
|
||||
return nil
|
||||
}
|
||||
var err error
|
||||
// Allows us to use marshal and unmarshall with results of FindOne() and others
|
||||
bsonOpts := &options.BSONOptions{
|
||||
|
@ -92,7 +92,10 @@ func (wfa *workflowMongoAccessor) book(id string, realData *Workflow, execs []*w
|
||||
if _, ok := methods[tools.POST]; !ok {
|
||||
return errors.New("no path found")
|
||||
}
|
||||
res, _, _ := wfa.LoadOne(id)
|
||||
res, code, _ := wfa.LoadOne(id)
|
||||
if code == 200 {
|
||||
return errors.New("could not load workflow")
|
||||
}
|
||||
r := res.(*Workflow)
|
||||
g := r.Graph
|
||||
if realData.Graph != nil {
|
||||
|
Loading…
Reference in New Issue
Block a user