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 {