From ad660b0ce863b0e616916e6d45303bfbb5e2e348 Mon Sep 17 00:00:00 2001 From: mr Date: Thu, 23 Jan 2025 11:28:48 +0100 Subject: [PATCH] light modification --- .../collaborative_area/collaborative_area_mongo_accessor.go | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) 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)