diff --git a/models/collaborative_area/collaborative_area_mongo_accessor.go b/models/collaborative_area/collaborative_area_mongo_accessor.go index ec43bcd..4febb6e 100644 --- a/models/collaborative_area/collaborative_area_mongo_accessor.go +++ b/models/collaborative_area/collaborative_area_mongo_accessor.go @@ -71,8 +71,9 @@ func (a *collaborativeAreaMongoAccessor) StoreOne(data utils.DBObject) (utils.DB 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()) + fmt.Println(dd, code, err) + if code != 200 || dd == nil { + return nil, code, errors.New("Could not retrieve the peer") } data.(*CollaborativeArea).CollaborativeAreaRule.Creator = dd[0].GetID() d, code, err := utils.GenericStoreOne(data.(*CollaborativeArea).Trim(), a)