From 386881c2832c0b236e795ba127e52536ef562653 Mon Sep 17 00:00:00 2001 From: mr Date: Thu, 23 Jan 2025 10:33:43 +0100 Subject: [PATCH] light modification --- .../collaborative_area/collaborative_area_mongo_accessor.go | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/models/collaborative_area/collaborative_area_mongo_accessor.go b/models/collaborative_area/collaborative_area_mongo_accessor.go index 27301b1..ec43bcd 100644 --- a/models/collaborative_area/collaborative_area_mongo_accessor.go +++ b/models/collaborative_area/collaborative_area_mongo_accessor.go @@ -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()) }