@dhyasama/totem-models 11.24.0 → 11.25.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.
Files changed (2) hide show
  1. package/lib/Account.js +7 -3
  2. package/package.json +1 -1
package/lib/Account.js CHANGED
@@ -248,9 +248,13 @@ module.exports = function(mongoose, config) {
248
248
 
249
249
  if (!cb) { throw new Error('cb is required'); }
250
250
 
251
- self
252
- .find({ 'active': true, 'summary.active': true })
253
- .exec(cb);
251
+ let queryObj = { 'active': true, 'summary.active': true };
252
+
253
+ if (options.CUSTOMER_ID) {
254
+ queryObj['org'] = options.CUSTOMER_ID;
255
+ }
256
+
257
+ self.find(queryObj).exec(cb);
254
258
 
255
259
  };
256
260
 
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@dhyasama/totem-models",
3
- "version": "11.24.0",
3
+ "version": "11.25.0",
4
4
  "author": "Jason Reynolds",
5
5
  "license": "UNLICENSED",
6
6
  "description": "Models for Totem platform",