@dhyasama/totem-models 8.6.3 → 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 +0 -3
- package/lib/Round.js +8 -0
- package/package.json +1 -1
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,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
|
});
|