@dhyasama/totem-models 8.8.1 → 8.8.3
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 +2 -0
- package/lib/Investment.js +3 -1
- package/package.json +1 -1
package/helpers.js
CHANGED
|
@@ -81,6 +81,8 @@ const getPeopleSources = module.exports.getPeopleSources = function getPeopleSou
|
|
|
81
81
|
if (!people) { return []; }
|
|
82
82
|
if (!Array.isArray(people)) { return []; }
|
|
83
83
|
|
|
84
|
+
people = _.reject(people, function(p) { return !p || !p.sources; });
|
|
85
|
+
|
|
84
86
|
let result = _.compact(_.pluck(people, 'sources'));
|
|
85
87
|
if (result.length === 0) { return []; }
|
|
86
88
|
|
package/lib/Investment.js
CHANGED
|
@@ -159,7 +159,9 @@ module.exports = function(mongoose, config) {
|
|
|
159
159
|
|
|
160
160
|
Investment.post('remove', function(doc) {
|
|
161
161
|
// Clean up reference
|
|
162
|
-
Round.removeInvestment(doc._id)
|
|
162
|
+
Round.removeInvestment(doc._id, function(err, result) {
|
|
163
|
+
if (err) console.log(err);
|
|
164
|
+
});
|
|
163
165
|
});
|
|
164
166
|
|
|
165
167
|
|