@dhyasama/totem-models 1.29.0 → 1.29.2

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.
@@ -410,13 +410,11 @@ module.exports = function(mongoose, config) {
410
410
  var query;
411
411
 
412
412
  var getLps = function(q) {
413
- console.time('getLps');
414
413
  q.populate('fundsInvested.fund')
415
414
  q.populate('people', 'name')
416
415
  q.exec(function (err, lps) {
417
416
  if (err) return cb(err, null);
418
417
  lps = _.sortBy(lps, function(lp) { return lp.name ? lp.name.toLowerCase() : ''; });
419
- console.timeEnd('getLps');
420
418
  return cb(null, lps);
421
419
  });
422
420
  };
@@ -872,7 +872,15 @@ module.exports = function(mongoose, config) {
872
872
  'people.person.calendarEventSummaries.notes.createdBy': { select: 'name avatarUrl title doNotDisplay' }
873
873
  }
874
874
  })
875
- .exec(cb);
875
+ .exec(function(err, result) {
876
+ _.each(result.people, function(peep) {
877
+ if (!peep) return;
878
+ if (!peep.person) return;
879
+ if (!peep.person.calendarEventSummaries) return;
880
+ peep.person.calendarEventSummaries = peep.person.calendarEventSummaries.slice(0, 10);
881
+ });
882
+ return cb(err, result);
883
+ });
876
884
 
877
885
  };
878
886
 
package/lib/Person.js CHANGED
@@ -142,7 +142,9 @@ module.exports = function(mongoose, config) {
142
142
  },
143
143
  notes: [ { type: Schema.ObjectId, ref: 'Note' } ]
144
144
  }
145
- ]
145
+ ],
146
+
147
+ doNotDisplay: { type: Boolean, default: false }
146
148
 
147
149
  });
148
150
 
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@dhyasama/totem-models",
3
- "version": "1.29.0",
3
+ "version": "1.29.2",
4
4
  "author": "Jason Reynolds",
5
5
  "license": "UNLICENSED",
6
6
  "description": "Models for Totem platform",