@dhyasama/totem-models 8.0.7 → 8.0.9

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.
@@ -1344,11 +1344,14 @@ module.exports = function(mongoose, config) {
1344
1344
  if (!id) { return cb(new Error('id is required'), null); }
1345
1345
  if (!mongoose.Types.ObjectId.isValid(id)) { return cb(new Error('id is not a valid ObjectId'), null); }
1346
1346
  if (!options) { return cb(new Error('options is required'), null); }
1347
- if (!options.CUSTOMER_ID) { return cb(new Error('options.CUSTOMER_ID is required'), null); }
1348
- if (!mongoose.Types.ObjectId.isValid(options.CUSTOMER_ID)) { return cb(new Error('options.CUSTOMER_ID is not a valid ObjectId'), null); }
1349
1347
 
1350
1348
  options = helpers.getDefaultOptions(options);
1351
1349
 
1350
+ if (!options.isWorkerProcess) {
1351
+ if (!options.CUSTOMER_ID) { return cb(new Error('options.CUSTOMER_ID is required'), null); }
1352
+ if (!mongoose.Types.ObjectId.isValid(options.CUSTOMER_ID)) { return cb(new Error('options.CUSTOMER_ID is not a valid ObjectId'), null); }
1353
+ }
1354
+
1352
1355
  let lpPopulateOptions = { path: 'lps' };
1353
1356
  if (!options.isWorkerProcess) { lpPopulateOptions.match = { customer: options.CUSTOMER_ID }; }
1354
1357
 
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@dhyasama/totem-models",
3
- "version": "8.0.7",
3
+ "version": "8.0.9",
4
4
  "author": "Jason Reynolds",
5
5
  "license": "UNLICENSED",
6
6
  "description": "Models for Totem platform",