@dhyasama/totem-models 9.85.0 → 9.87.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.
@@ -108,13 +108,13 @@ module.exports = function(mongoose, config) {
108
108
  if (!mongoose.Types.ObjectId.isValid(customerId)) { return cb(new Error('customerId is not a valid ObjectId'), null); }
109
109
 
110
110
  const query = self.find({
111
- customer: customerId
111
+ customer: customerId,
112
+ $or: [
113
+ { processed: true },
114
+ { numberOfFailedAttempts: { $lt: MAX_PROCESSING_ATTEMPTS } }
115
+ ]
112
116
  });
113
117
 
114
- // Processed or done trying
115
- query['$or'].push({ processed: true });
116
- query['$or'].push({ numberOfFailedAttempts: { $lt: MAX_PROCESSING_ATTEMPTS } });
117
-
118
118
  query.exec(cb);
119
119
 
120
120
  };
@@ -63,6 +63,8 @@ module.exports = function(mongoose, config) {
63
63
  campaign: campaignId
64
64
  });
65
65
 
66
+ query.populate('limitedPartner', 'name');
67
+
66
68
  query.exec(cb);
67
69
 
68
70
  };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@dhyasama/totem-models",
3
- "version": "9.85.0",
3
+ "version": "9.87.0",
4
4
  "author": "Jason Reynolds",
5
5
  "license": "UNLICENSED",
6
6
  "description": "Models for Totem platform",