@dhyasama/totem-models 1.19.0 → 1.19.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.
@@ -608,7 +608,6 @@ module.exports = function(mongoose, config) {
608
608
  .find({ '_id': { $in : ids }})
609
609
  .populate('people.person', 'name avatarUrl title calendarEventSummaries sources')
610
610
  .populate('related', 'name logoUrl')
611
- .populate('notes')
612
611
  .populate('chairs.first', 'name avatarUrl title')
613
612
  .populate('chairs.second', 'name avatarUrl title')
614
613
  .populate('funds', 'name hexColorCode')
@@ -616,15 +615,13 @@ module.exports = function(mongoose, config) {
616
615
  'people.person.sources.person',
617
616
  'people.person.calendarEventSummaries.attendees.internal',
618
617
  'people.person.calendarEventSummaries.attendees.external',
619
- 'people.person.calendarEventSummaries.notes.createdBy',
620
- 'notes.createdBy'
618
+ 'people.person.calendarEventSummaries.notes.createdBy'
621
619
  ], {
622
620
  populate: {
623
621
  'people.person.sources.person': { select: 'name avatarUrl title' },
624
622
  'people.person.calendarEventSummaries.attendees.internal': { select: 'name avatarUrl title' },
625
623
  'people.person.calendarEventSummaries.attendees.external': { select: 'name avatarUrl title' },
626
- 'people.person.calendarEventSummaries.notes.createdBy': { select: 'name avatarUrl title' },
627
- 'notes.createdBy': { select: 'name avatarUrl title' }
624
+ 'people.person.calendarEventSummaries.notes.createdBy': { select: 'name avatarUrl title' }
628
625
  }
629
626
  })
630
627
  .exec(cb);
@@ -750,7 +747,6 @@ module.exports = function(mongoose, config) {
750
747
  .findById(id)
751
748
  .populate('people.person', 'name avatarUrl title calendarEventSummaries sources')
752
749
  .populate('related', 'name logoUrl')
753
- .populate('notes')
754
750
  .populate('chairs.first', 'name avatarUrl title')
755
751
  .populate('chairs.second', 'name avatarUrl title')
756
752
  .populate('funds', 'name hexColorCode closeDate')
@@ -761,15 +757,13 @@ module.exports = function(mongoose, config) {
761
757
  'people.person.sources.person',
762
758
  'people.person.calendarEventSummaries.attendees.internal',
763
759
  'people.person.calendarEventSummaries.attendees.external',
764
- 'people.person.calendarEventSummaries.notes.createdBy',
765
- 'notes.createdBy'
760
+ 'people.person.calendarEventSummaries.notes.createdBy'
766
761
  ], {
767
762
  populate: {
768
763
  'people.person.sources.person': { select: 'name avatarUrl title' },
769
764
  'people.person.calendarEventSummaries.attendees.internal': { select: 'name avatarUrl title' },
770
765
  'people.person.calendarEventSummaries.attendees.external': { select: 'name avatarUrl title' },
771
- 'people.person.calendarEventSummaries.notes.createdBy': { select: 'name avatarUrl title' },
772
- 'notes.createdBy': { select: 'name avatarUrl title' }
766
+ 'people.person.calendarEventSummaries.notes.createdBy': { select: 'name avatarUrl title' }
773
767
  }
774
768
  })
775
769
  .exec(cb);
package/lib/Person.js CHANGED
@@ -703,15 +703,12 @@ module.exports = function(mongoose, config) {
703
703
  .populate('calendarEventSummaries.attendees.external', 'avatarUrl name title')
704
704
  .populate('calendarEventSummaries.attendees.internal', 'avatarUrl name title')
705
705
  .populate('calendarEventSummaries.notes')
706
- .populate('notes')
707
706
  .populate('related')
708
707
  .populate('sources.person', 'avatarUrl name title')
709
708
  .deepPopulate([
710
- 'notes.createdBy',
711
709
  'calendarEventSummaries.notes.createdBy'
712
710
  ], {
713
711
  populate: {
714
- 'notes.createdBy': {select: 'avatarUrl name'},
715
712
  'calendarEventSummaries.notes.createdBy': { select: 'avatarUrl name' }
716
713
  }
717
714
  })
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@dhyasama/totem-models",
3
- "version": "1.19.0",
3
+ "version": "1.19.1",
4
4
  "author": "Jason Reynolds",
5
5
  "license": "UNLICENSED",
6
6
  "description": "Models for Totem platform",
@@ -717,26 +717,6 @@ describe('Organization', function() {
717
717
 
718
718
  });
719
719
 
720
- it('gets an org by id with a populated note', function(done) {
721
-
722
- Organization.getById(org4.id, function(err, result) {
723
-
724
- should.not.exist(err);
725
- should.exist(result);
726
- result.notes.length.should.equal(1);
727
- should.exist(result.notes[0].createdBy);
728
- should.exist(result.notes[0].createdBy.avatarUrl);
729
- result.notes[0].createdBy.avatarUrl.length.should.be.above(0);
730
- should.exist(result.notes[0].createdBy.name);
731
- should.exist(result.notes[0].createdBy.name.first);
732
- result.notes[0].createdBy.name.first.length.should.be.above(0);
733
-
734
- return done();
735
-
736
- });
737
-
738
- });
739
-
740
720
  it('deletes a simple note', function(done) {
741
721
 
742
722
  Organization.deleteNote(noteId, function(err, result) {