light modification
This commit is contained in:
parent
8cba10c4fe
commit
386881c283
@ -67,8 +67,10 @@ func (a *collaborativeAreaMongoAccessor) StoreOne(data utils.DBObject) (utils.DB
|
||||
_, id := (&peer.Peer{}).IsMySelf() // get the local peer
|
||||
data.(*CollaborativeArea).Clear(id) // set the creator
|
||||
// retrieve or proper peer
|
||||
dd, code, err := a.peerAccessor.Search(nil, "0", true)
|
||||
|
||||
dd, code, err := a.peerAccessor.Search(&dbs.Filters{
|
||||
And: map[string][]dbs.Filter{
|
||||
"state": {{Operator: dbs.EQUAL.String(), Value: 0}},
|
||||
}}, "", true)
|
||||
if code != 200 || dd == nil || len(dd) == 0 {
|
||||
return nil, code, errors.New("Could not retrieve the peer" + err.Error())
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user