@dhyasama/totem-models 3.9.0 → 3.10.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.
@@ -650,6 +650,20 @@ module.exports = function(mongoose, config) {
650
650
 
651
651
  };
652
652
 
653
+ Organization.statics.removeCustomerFilters = function(customerId, cb) {
654
+
655
+ var self = this;
656
+
657
+ self
658
+ .update(
659
+ { 'filters.customer': customerId },
660
+ { $pull : { 'filters': { 'customer': customerId } } },
661
+ { multi : true }
662
+ )
663
+ .exec(cb);
664
+
665
+ };
666
+
653
667
  Organization.statics.findByDomains = function findByDomains(domains, cb) {
654
668
  domains = domains.map(function(domain){ return domain.toLowerCase() })
655
669
  var query = this.find({ $or: [ {'website': { $in : domains }}, {'websiteAliases': { $in : domains }} ], 'deleted': {$ne: true} });
@@ -833,7 +847,7 @@ module.exports = function(mongoose, config) {
833
847
  if (config.CUSTOMER_ID != 'GLOBAL_PROCESS') lpPopulateOptions.match = { customer: config.CUSTOMER_ID };
834
848
 
835
849
  var query = self.findById(id);
836
- query.populate('people.person', 'name avatarUrl title doNotDisplay');
850
+ query.populate('people.person', 'name avatarUrl title contact doNotDisplay');
837
851
  query.populate('related', 'name logoUrl');
838
852
  query.populate('chairs.first', 'name avatarUrl title');
839
853
  query.populate('chairs.second', 'name avatarUrl title');
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@dhyasama/totem-models",
3
- "version": "3.9.0",
3
+ "version": "3.10.0",
4
4
  "author": "Jason Reynolds",
5
5
  "license": "UNLICENSED",
6
6
  "description": "Models for Totem platform",