mirror of
https://github.com/NodeBB/NodeBB.git
synced 2025-11-16 18:56:15 +01:00
dont update category post coint if topic post count is invalid
This commit is contained in:
@@ -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);
|
||||
|
||||
Reference in New Issue
Block a user