@dhyasama/totem-models 8.6.0 → 8.6.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.
- package/helpers.js +11 -1
- package/lib/Round.js +1 -1
- package/package.json +1 -1
package/helpers.js
CHANGED
|
@@ -81,7 +81,17 @@ const getPeopleSources = module.exports.getPeopleSources = function getPeopleSou
|
|
|
81
81
|
if (!people) { return []; }
|
|
82
82
|
if (!Array.isArray(people)) { return []; }
|
|
83
83
|
|
|
84
|
-
let result
|
|
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
|
+
|
|
85
95
|
if (result.length === 0) { return []; }
|
|
86
96
|
|
|
87
97
|
result = _.flatten(result);
|
package/lib/Round.js
CHANGED
|
@@ -569,7 +569,7 @@ module.exports = function(mongoose, config) {
|
|
|
569
569
|
|
|
570
570
|
_.each(rounds, function(round) {
|
|
571
571
|
_.each(round.vehicles, function(vehicle) {
|
|
572
|
-
if(vehicle.fund === fundId) {
|
|
572
|
+
if(vehicle.fund.toString() === fundId.toString()) {
|
|
573
573
|
_.each(vehicle.investments, function(investment) {
|
|
574
574
|
investment.organization = round.organization;
|
|
575
575
|
investment.roundName = round.roundName;
|