From 26e6a22278c426802e8f80e70cefcffc73653a25 Mon Sep 17 00:00:00 2001 From: Julian Lam Date: Thu, 8 May 2025 13:55:42 -0400 Subject: [PATCH] fix: #13397, null values in category sync list --- src/upgrades/4.3.2/fix_category_sync_null_values.js | 12 ++++++++++++ 1 file changed, 12 insertions(+) create mode 100644 src/upgrades/4.3.2/fix_category_sync_null_values.js diff --git a/src/upgrades/4.3.2/fix_category_sync_null_values.js b/src/upgrades/4.3.2/fix_category_sync_null_values.js new file mode 100644 index 0000000000..e81590cf27 --- /dev/null +++ b/src/upgrades/4.3.2/fix_category_sync_null_values.js @@ -0,0 +1,12 @@ +'use strict'; + +const db = require('../../database'); + +module.exports = { + name: 'Fix null values in category synchronization list', + timestamp: Date.UTC(2025, 4, 8), + method: async () => { + const cids = await db.getSortedSetMembers('categories:cid'); + await db.sortedSetsRemove(cids.map(cid => `followRequests:cid.${cid}`), 'null'); + }, +};