@dhyasama/totem-models 6.33.2 → 6.33.3

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.
Files changed (2) hide show
  1. package/lib/Deal.js +10 -2
  2. package/package.json +1 -1
package/lib/Deal.js CHANGED
@@ -147,7 +147,7 @@ module.exports = function(mongoose, config) {
147
147
  '_id': id,
148
148
  'customer': config.CUSTOMER_ID
149
149
  })
150
- .populate('organization', 'name logoUrl website websiteAliases')
150
+ .populate('organization', 'name description logoUrl website websiteAliases chairs')
151
151
  .populate('messages')
152
152
  .populate('source.person', 'name avatarUrl title')
153
153
  .populate('referrer.person', 'name avatarUrl title')
@@ -156,7 +156,15 @@ module.exports = function(mongoose, config) {
156
156
  match: { customer: config.CUSTOMER_ID }
157
157
  })
158
158
  .populate('history.account', 'person')
159
- .exec(cb);
159
+ .exec(function(err, deal) {
160
+
161
+ if (err) return cb(err, null);
162
+
163
+ deal.deepPopulate('organization.chairs.first', {
164
+ populate: { 'organization.chairs.first': { select: 'name avatarUrl title doNotDisplay' } }
165
+ }, cb);
166
+
167
+ });
160
168
 
161
169
  };
162
170
 
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@dhyasama/totem-models",
3
- "version": "6.33.2",
3
+ "version": "6.33.3",
4
4
  "author": "Jason Reynolds",
5
5
  "license": "UNLICENSED",
6
6
  "description": "Models for Totem platform",