simplify call to peer
This commit is contained in:
parent
00625eabd6
commit
143fe1446e
@ -177,6 +177,15 @@ func (wfa *sharedWorkspaceMongoAccessor) StoreOne(data utils.DBObject) (utils.DB
|
||||
data.(*SharedWorkspace).CreatorID = id
|
||||
data.(*SharedWorkspace).Peers = append(data.(*SharedWorkspace).Peers, id)
|
||||
d, code, err := wfa.GenericStoreOne(data.(*SharedWorkspace), wfa)
|
||||
if data.(*SharedWorkspace).Workspaces == nil {
|
||||
data.(*SharedWorkspace).Workspaces = []string{}
|
||||
}
|
||||
if data.(*SharedWorkspace).Workflows == nil {
|
||||
data.(*SharedWorkspace).Workflows = []string{}
|
||||
}
|
||||
if data.(*SharedWorkspace).Rules == nil {
|
||||
data.(*SharedWorkspace).Rules = []string{}
|
||||
}
|
||||
if code == 200 {
|
||||
wfa.sharedWorkflow(d.(*SharedWorkspace), d.GetID())
|
||||
wfa.sharedWorkspace(d.(*SharedWorkspace), d.GetID())
|
||||
|
Loading…
Reference in New Issue
Block a user