@dhyasama/totem-models 7.5.0 → 7.5.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/lib/Round.js +4 -2
- package/package.json +1 -1
package/lib/Round.js
CHANGED
|
@@ -875,6 +875,10 @@ module.exports = function(mongoose, config) {
|
|
|
875
875
|
|
|
876
876
|
// participating vehicles are public
|
|
877
877
|
// merge private data that was matched for customer
|
|
878
|
+
|
|
879
|
+
doc.vehicles = _.filter(doc.vehicles, function(vehicle) {
|
|
880
|
+
return vehicle.investments.length > 0;
|
|
881
|
+
});
|
|
878
882
|
|
|
879
883
|
var allInvestments = _.flatten(_.pluck(doc.vehicles, 'investments'));
|
|
880
884
|
var mostRecentInvestment = _.max(allInvestments, function(investment) { return investment.investmentDate; });
|
|
@@ -890,8 +894,6 @@ module.exports = function(mongoose, config) {
|
|
|
890
894
|
|
|
891
895
|
});
|
|
892
896
|
|
|
893
|
-
|
|
894
|
-
|
|
895
897
|
///////////////////////////////////////////////////////////////////////////////////////
|
|
896
898
|
// CONFIG
|
|
897
899
|
///////////////////////////////////////////////////////////////////////////////////////
|