@dhyasama/totem-models 1.23.0 → 1.23.1
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/Organization.js +4 -4
- package/package.json +1 -1
package/lib/Organization.js
CHANGED
|
@@ -776,6 +776,9 @@ module.exports = function(mongoose, config) {
|
|
|
776
776
|
|
|
777
777
|
var self = this;
|
|
778
778
|
|
|
779
|
+
var lpPopulateOptions = { path: 'lps' };
|
|
780
|
+
if (config.CUSTOMER_ID != 'GLOBAL_PROCESS') lpPopulateOptions.match = { customer: config.CUSTOMER_ID };
|
|
781
|
+
|
|
779
782
|
self
|
|
780
783
|
.findById(id)
|
|
781
784
|
.populate('people.person', 'name avatarUrl title calendarEventSummaries sources')
|
|
@@ -785,10 +788,7 @@ module.exports = function(mongoose, config) {
|
|
|
785
788
|
.populate('funds', 'name hexColorCode closeDate')
|
|
786
789
|
.populate('operating.acquired.public.by', 'name logoUrl')
|
|
787
790
|
.populate('operating.acquired.private.by', 'name logoUrl')
|
|
788
|
-
.populate(
|
|
789
|
-
path: 'lps',
|
|
790
|
-
match: { customer: config.CUSTOMER_ID }
|
|
791
|
-
})
|
|
791
|
+
.populate(lpPopulateOptions)
|
|
792
792
|
.deepPopulate([
|
|
793
793
|
'people.person.sources.person',
|
|
794
794
|
'people.person.calendarEventSummaries.attendees.internal',
|