@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.
- package/lib/Deal.js +2 -4
- 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,
|
|
709
|
+
if (vote !== null) { upsertPollItem(id, key, voterid, vote, saveHistory); }
|
|
712
710
|
|
|
713
711
|
// Lack of value is a removal
|
|
714
|
-
else { removePollItem(id,
|
|
712
|
+
else { removePollItem(id, key, voterid, saveHistory); }
|
|
715
713
|
|
|
716
714
|
};
|
|
717
715
|
|