@dhyasama/totem-models 10.33.0 → 10.33.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.
Files changed (2) hide show
  1. package/lib/Deal.js +2 -4
  2. package/package.json +1 -1
package/lib/Deal.js CHANGED
@@ -571,8 +571,6 @@ module.exports = function(mongoose, config) {
571
571
 
572
572
  const self = this;
573
573
 
574
- const customFieldPath = 'customFields.' + key;
575
-
576
574
  // Remove this user's vote for this deal
577
575
  const removePollItem = function(id, path, voterid, callback) {
578
576
 
@@ -708,10 +706,10 @@ module.exports = function(mongoose, config) {
708
706
  if (!mongoose.Types.ObjectId.isValid(customerId)) { return cb(new Error('customerId is not a valid ObjectId'), null); }
709
707
 
710
708
  // Save any value
711
- if (vote !== null) { upsertPollItem(id, customFieldPath, voterid, vote, saveHistory); }
709
+ if (vote !== null) { upsertPollItem(id, key, voterid, vote, saveHistory); }
712
710
 
713
711
  // Lack of value is a removal
714
- else { removePollItem(id, customFieldPath, voterid, saveHistory); }
712
+ else { removePollItem(id, key, voterid, saveHistory); }
715
713
 
716
714
  };
717
715
 
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@dhyasama/totem-models",
3
- "version": "10.33.0",
3
+ "version": "10.33.1",
4
4
  "author": "Jason Reynolds",
5
5
  "license": "UNLICENSED",
6
6
  "description": "Models for Totem platform",