@dhyasama/totem-models 8.100.0 → 8.102.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/lib/LimitedPartner.js +5 -1
- package/lib/Person.js +2 -0
- package/lib/Round.js +2 -2
- package/package.json +1 -1
package/lib/LimitedPartner.js
CHANGED
|
@@ -101,7 +101,10 @@ module.exports = function(mongoose, config) {
|
|
|
101
101
|
_id: false
|
|
102
102
|
}],
|
|
103
103
|
|
|
104
|
-
customFields: { type: Schema.Types.Mixed }
|
|
104
|
+
customFields: { type: Schema.Types.Mixed },
|
|
105
|
+
|
|
106
|
+
// customer specific (customer id is stored on doc)
|
|
107
|
+
documents: [ { type: Schema.ObjectId, ref: 'Document' } ]
|
|
105
108
|
|
|
106
109
|
});
|
|
107
110
|
|
|
@@ -364,6 +367,7 @@ module.exports = function(mongoose, config) {
|
|
|
364
367
|
path: 'notes',
|
|
365
368
|
match: { customer: options.CUSTOMER_ID }
|
|
366
369
|
});
|
|
370
|
+
query.populate('documents');
|
|
367
371
|
|
|
368
372
|
query.deepPopulate([
|
|
369
373
|
'people.sources.person',
|
package/lib/Person.js
CHANGED
|
@@ -93,6 +93,7 @@ module.exports = function(mongoose, config) {
|
|
|
93
93
|
|
|
94
94
|
notes: [ { type: Schema.ObjectId, ref: 'Note' } ],
|
|
95
95
|
|
|
96
|
+
// customer specific (customer id is stored on doc)
|
|
96
97
|
documents: [ { type: Schema.ObjectId, ref: 'Document' } ],
|
|
97
98
|
|
|
98
99
|
// this only relates to access for lps
|
|
@@ -394,6 +395,7 @@ module.exports = function(mongoose, config) {
|
|
|
394
395
|
.select('-previous')
|
|
395
396
|
.populate('related')
|
|
396
397
|
.populate('sources.person', 'avatarUrl name title doNotDisplay')
|
|
398
|
+
.populate('documents')
|
|
397
399
|
.exec(function (err, person) {
|
|
398
400
|
|
|
399
401
|
if (err) return cb(err, null);
|
package/lib/Round.js
CHANGED
|
@@ -108,8 +108,8 @@ module.exports = function(mongoose, config) {
|
|
|
108
108
|
_.each(grouped, function(rounds) {
|
|
109
109
|
|
|
110
110
|
var websites = [];
|
|
111
|
-
if(rounds[0].organization.website) websites.push(rounds[0].organization.
|
|
112
|
-
if(rounds[0].organization.websiteAliases) websites = _.union(websites, websiteAliases);
|
|
111
|
+
if(rounds[0].organization.website) websites.push(rounds[0].organization.website);
|
|
112
|
+
if(rounds[0].organization.websiteAliases) websites = _.union(websites, rounds[0].organization.websiteAliases);
|
|
113
113
|
websites = _.uniq(websites);
|
|
114
114
|
|
|
115
115
|
// construct the org
|