fix redis tests

v1.18.x
Barış Soner Uşaklı 7 years ago
parent 2c3fd5fbce
commit f7a0815b46

@ -74,7 +74,7 @@ module.exports = function (Topics) {
db.sortedSetAdd('topics:views', topicData.viewcount, tid, next);
},
function (next) {
db.sortedSetAdd('topics:votes', topicData.votes, tid, next);
db.sortedSetAdd('topics:votes', parseInt(topicData.votes, 10) || 0, tid, next);
},
function (next) {
async.waterfall([

@ -186,7 +186,7 @@ module.exports = function (Topics) {
async.apply(db.sortedSetRemove, 'cid:' + topicData.cid + ':tids:pinned', tid),
async.apply(db.sortedSetAdd, 'cid:' + topicData.cid + ':tids', topicData.lastposttime, tid),
async.apply(db.sortedSetAdd, 'cid:' + topicData.cid + ':tids:posts', topicData.postcount, tid),
async.apply(db.sortedSetAdd, 'cid:' + topicData.cid + ':tids:votes', topicData.votes, tid),
async.apply(db.sortedSetAdd, 'cid:' + topicData.cid + ':tids:votes', parseInt(topicData.votes, 10) || 0, tid),
], next);
}
},

Loading…
Cancel
Save