@dhyasama/totem-models 7.22.0 → 7.22.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/Organization.js +2 -2
- package/package.json +1 -1
package/lib/Organization.js
CHANGED
|
@@ -2163,7 +2163,7 @@ module.exports = function(mongoose, config) {
|
|
|
2163
2163
|
|
|
2164
2164
|
var CUSTOMER_ID = config.CUSTOMER_ID;
|
|
2165
2165
|
|
|
2166
|
-
if (CUSTOMER_ID == 'GLOBAL_PROCESS') return next();
|
|
2166
|
+
if (CUSTOMER_ID == 'GLOBAL_PROCESS' && next) return next();
|
|
2167
2167
|
|
|
2168
2168
|
// remove customer details if not viewing self
|
|
2169
2169
|
if (doc._id.toString() != CUSTOMER_ID) doc.customer = {};
|
|
@@ -2195,7 +2195,7 @@ module.exports = function(mongoose, config) {
|
|
|
2195
2195
|
|
|
2196
2196
|
});
|
|
2197
2197
|
|
|
2198
|
-
return next();
|
|
2198
|
+
if (next) return next();
|
|
2199
2199
|
|
|
2200
2200
|
});
|
|
2201
2201
|
|