Skip to content

Node.js based forum software built for the modern web

fix: #13397, null values in category sync list

Julian Lam26e6a22278c4
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');
+ },
+};