mirror of
https://github.com/NodeBB/NodeBB.git
synced 2025-10-26 16:46:12 +01:00
fix: unintentional parseInt during post purge
This commit is contained in:
@@ -417,4 +417,6 @@ Notes.prune = async () => {
|
||||
await batch.processArray(tids, async (tids) => {
|
||||
await Promise.all(tids.map(async tid => await topics.purgePostsAndTopic(tid, 0)));
|
||||
}, { batch: 100 });
|
||||
|
||||
winston.info('[notes/prune] Scheduled pruning of topics complete.');
|
||||
};
|
||||
|
||||
@@ -115,7 +115,7 @@ module.exports = function (Posts) {
|
||||
incrObjectBulk.push([`category:${cid}`, { post_count: -posts.length }]);
|
||||
}
|
||||
|
||||
const postsByTopic = _.groupBy(postData, p => parseInt(p.tid, 10));
|
||||
const postsByTopic = _.groupBy(postData, p => String(p.tid));
|
||||
const topicPostCountTasks = [];
|
||||
const topicTasks = [];
|
||||
const zsetIncrBulk = [];
|
||||
|
||||
Reference in New Issue
Block a user