Skip to content

Node.js based forum software built for the modern web

fix: non-functional upgrade script

Julian Lam1c7fb8fe1101
diff --git a/src/upgrades/1.12.1/post_upload_sizes.js b/src/upgrades/1.12.1/post_upload_sizes.js
index 37df4e70c8..8c545b1657 100644
--- a/src/upgrades/1.12.1/post_upload_sizes.js
+++ b/src/upgrades/1.12.1/post_upload_sizes.js
@@ -10,11 +10,11 @@ module.exports = {
method: async function () {
const { progress } = this;
- await batch.processSortedSet('posts:pid', async (postData) => {
- const keys = postData.map(p => `post:${p.pid}:uploads`);
+ await batch.processSortedSet('posts:pid', async (pids) => {
+ const keys = pids.map(p => `post:${p}:uploads`);
const uploads = await db.getSortedSetRange(keys, 0, -1);
await posts.uploads.saveSize(uploads);
- progress.incr(postData.length);
+ progress.incr(pids.length);
}, {
batch: 100,
progress: progress,