light modification
This commit is contained in:
parent
49e495f062
commit
5cc68bca6d
@ -68,11 +68,11 @@ func (a *collaborativeAreaMongoAccessor) StoreOne(data utils.DBObject) (utils.DB
|
|||||||
data.(*CollaborativeArea).Clear(id) // set the creator
|
data.(*CollaborativeArea).Clear(id) // set the creator
|
||||||
// retrieve or proper peer
|
// retrieve or proper peer
|
||||||
dd, code, err := a.peerAccessor.Search(&dbs.Filters{
|
dd, code, err := a.peerAccessor.Search(&dbs.Filters{
|
||||||
And: map[string][]dbs.Filter{
|
Or: map[string][]dbs.Filter{
|
||||||
"state": {{Operator: dbs.EQUAL.String(), Value: 0}},
|
"state": {{Operator: dbs.EQUAL.String(), Value: 0}},
|
||||||
}}, "", true)
|
}}, "", false)
|
||||||
fmt.Println(dd, code, err)
|
fmt.Println(dd, code, err)
|
||||||
if code != 200 || dd == nil {
|
if code != 200 || dd == nil || len(dd) == 0 {
|
||||||
return nil, code, errors.New("could not retrieve the peer")
|
return nil, code, errors.New("could not retrieve the peer")
|
||||||
}
|
}
|
||||||
if data.(*CollaborativeArea).CollaborativeAreaRule != nil {
|
if data.(*CollaborativeArea).CollaborativeAreaRule != nil {
|
||||||
|
Loading…
Reference in New Issue
Block a user