update count even if its 0

v1.18.x
barisusakli 9 years ago
parent 7ee584b632
commit 4ef2ae7ba2

@ -66,9 +66,10 @@ module.exports = function(Topics) {
function updateTagCount(tag, callback) {
callback = callback || function() {};
Topics.getTagTopicCount(tag, function(err, count) {
if (err || !count) {
if (err) {
return callback(err);
}
count = count || 0;
db.sortedSetAdd('tags:topic:count', count, tag, callback);
});

Loading…
Cancel
Save