dont update category post coint if topic post count is invalid

v1.18.x
barisusakli 10 years ago
parent 974a091f1b
commit 32d0e0d7e5

@ -147,7 +147,9 @@ module.exports = function(Categories) {
if (err) {
return winston.error(err.message);
}
if (!parseInt(postCount, 10)) {
return;
}
async.parallel([
function(next) {
db.incrObjectFieldBy('category:' + oldCid, 'post_count', -postCount, next);

Loading…
Cancel
Save