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