@dhyasama/totem-models 8.87.0 → 8.89.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.
package/helpers.js CHANGED
@@ -21,8 +21,8 @@ const cleanOrg = module.exports.cleanOrg = function cleanOrg(doc, customerId) {
21
21
  doc.filters = _.reject(doc.filters, function(item) { return !item || !item.customer || item.customer.toString() !== customerId.toString(); });
22
22
  doc.lps = _.reject(doc.lps, function(item) { return !item || !item.customer || item.customer.toString() !== customerId.toString(); });
23
23
  doc.valuations = _.reject(doc.valuations, function(item) { return !item || !item.customer || item.customer.toString() !== customerId.toString(); });
24
- doc.operating.acquired.private = _.find(doc.operating.acquired.private, function(item) { return item || return !item.customer || item.customer.toString() === customerId.toString(); });
25
- doc.operating.closed.private = _.find(doc.operating.closed.private, function(item) { return item || !item.customer || item.customer.toString() === customerId.toString(); });
24
+ doc.operating.acquired.private = _.find(doc.operating.acquired.private, function(item) { return item && item.customer && item.customer.toString() === customerId.toString(); });
25
+ doc.operating.closed.private = _.find(doc.operating.closed.private, function(item) { return item && item.customer && item.customer.toString() === customerId.toString(); });
26
26
  return doc;
27
27
 
28
28
  };
@@ -1850,9 +1850,6 @@ module.exports = function(mongoose, config) {
1850
1850
  // Clean up missing references
1851
1851
  org.people = _.reject(org.people, function(item) { return !item.person; });
1852
1852
 
1853
- // Required for mixed types
1854
- org.markModified('customFields.fields');
1855
-
1856
1853
  org.save(cb);
1857
1854
 
1858
1855
  };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@dhyasama/totem-models",
3
- "version": "8.87.0",
3
+ "version": "8.89.0",
4
4
  "author": "Jason Reynolds",
5
5
  "license": "UNLICENSED",
6
6
  "description": "Models for Totem platform",