From 49e495f062ebff4490a2399f7b6c0f4edd2a83a1 Mon Sep 17 00:00:00 2001 From: mr Date: Thu, 23 Jan 2025 12:49:59 +0100 Subject: [PATCH] light modification --- models/collaborative_area/collaborative_area_mongo_accessor.go | 3 +++ 1 file changed, 3 insertions(+) diff --git a/models/collaborative_area/collaborative_area_mongo_accessor.go b/models/collaborative_area/collaborative_area_mongo_accessor.go index 666e644..a4c3a19 100644 --- a/models/collaborative_area/collaborative_area_mongo_accessor.go +++ b/models/collaborative_area/collaborative_area_mongo_accessor.go @@ -75,6 +75,9 @@ func (a *collaborativeAreaMongoAccessor) StoreOne(data utils.DBObject) (utils.DB if code != 200 || dd == nil { return nil, code, errors.New("could not retrieve the peer") } + if data.(*CollaborativeArea).CollaborativeAreaRule != nil { + data.(*CollaborativeArea).CollaborativeAreaRule = &CollaborativeAreaRule{} + } data.(*CollaborativeArea).CollaborativeAreaRule.Creator = dd[0].GetID() d, code, err := utils.GenericStoreOne(data.(*CollaborativeArea).Trim(), a) if code == 200 {