@dhyasama/totem-models 9.8.0 → 9.9.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.
Files changed (2) hide show
  1. package/lib/CapTable.js +7 -13
  2. package/package.json +1 -1
package/lib/CapTable.js CHANGED
@@ -150,12 +150,9 @@ module.exports = function(mongoose, config) {
150
150
  });
151
151
 
152
152
  query.populate('organization', 'name logoUrl');
153
-
154
- if(options.populateStakeholders) {
155
- query.populate('stakeholders.lp', 'name')
156
- query.populate('stakeholders.org', 'name logoUrl')
157
- query.populate('stakeholders.person', 'name avatarUrl title')
158
- }
153
+ query.populate('stakeholders.lp', 'name')
154
+ query.populate('stakeholders.org', 'name logoUrl')
155
+ query.populate('stakeholders.person', 'name avatarUrl title')
159
156
 
160
157
  query.exec(cb);
161
158
 
@@ -196,7 +193,7 @@ module.exports = function(mongoose, config) {
196
193
  if (!options.CUSTOMER_ID) { return cb(new Error('options.CUSTOMER_ID is required'), null); }
197
194
  if (!mongoose.Types.ObjectId.isValid(options.CUSTOMER_ID)) { return cb(new Error('options.CUSTOMER_ID is not a valid ObjectId'), null); }
198
195
 
199
- query = self.find({
196
+ query = self.findOne({
200
197
  customer: options.CUSTOMER_ID,
201
198
  organization: orgid
202
199
  });
@@ -204,12 +201,9 @@ module.exports = function(mongoose, config) {
204
201
  }
205
202
 
206
203
  query.populate('organization', 'name logoUrl');
207
-
208
- if(options.populateStakeholders) {
209
- query.populate('stakeholders.lp', 'name')
210
- query.populate('stakeholders.org', 'name logoUrl')
211
- query.populate('stakeholders.person', 'name avatarUrl title')
212
- }
204
+ query.populate('stakeholders.lp', 'name')
205
+ query.populate('stakeholders.org', 'name logoUrl')
206
+ query.populate('stakeholders.person', 'name avatarUrl title')
213
207
 
214
208
  query.exec(cb);
215
209
 
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@dhyasama/totem-models",
3
- "version": "9.8.0",
3
+ "version": "9.9.0",
4
4
  "author": "Jason Reynolds",
5
5
  "license": "UNLICENSED",
6
6
  "description": "Models for Totem platform",