@dhyasama/totem-models 8.6.3 → 8.7.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/helpers.js CHANGED
@@ -81,10 +81,7 @@ const getPeopleSources = module.exports.getPeopleSources = function getPeopleSou
81
81
  if (!people) { return []; }
82
82
  if (!Array.isArray(people)) { return []; }
83
83
 
84
- people = _.compact(people);
85
-
86
84
  let result = _.compact(_.pluck(people, 'sources'));
87
-
88
85
  if (result.length === 0) { return []; }
89
86
 
90
87
  result = _.flatten(result);
package/lib/Round.js CHANGED
@@ -672,6 +672,13 @@ module.exports = function(mongoose, config) {
672
672
  let error = checkForUnpopulatedData(rounds, 'Round.getPortfolioByFund');
673
673
  if (error) return cb(error, null);
674
674
 
675
+ if (!options.isWorkerProcess) {
676
+ _.each(rounds, function(round) {
677
+ round.organization = helpers.cleanOrg(round.organization, options.CUSTOMER_ID);
678
+ if(round.organization.filters) console.log(round.organization.filters.toObject());
679
+ });
680
+ }
681
+
675
682
  return cb(null, buildPortfolio(rounds, [fundId]));
676
683
 
677
684
  });
@@ -729,6 +736,13 @@ module.exports = function(mongoose, config) {
729
736
  let error = checkForUnpopulatedData(rounds, 'Round.getPortfolioByFunds');
730
737
  if (error) return cb(error, null);
731
738
 
739
+ if (!options.isWorkerProcess) {
740
+ _.each(rounds, function(round) {
741
+ round.organization = helpers.cleanOrg(round.organization, options.CUSTOMER_ID);
742
+ if(round.organization.filters) console.log(round.organization.filters.toObject());
743
+ });
744
+ }
745
+
732
746
  return cb(null, buildPortfolio(rounds, fundIds));
733
747
 
734
748
  });
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@dhyasama/totem-models",
3
- "version": "8.6.3",
3
+ "version": "8.7.1",
4
4
  "author": "Jason Reynolds",
5
5
  "license": "UNLICENSED",
6
6
  "description": "Models for Totem platform",