mirror of
https://github.com/NodeBB/NodeBB.git
synced 2025-10-26 08:36:12 +01:00
fix: #13397, null values in category sync list
This commit is contained in:
12
src/upgrades/4.3.2/fix_category_sync_null_values.js
Normal file
12
src/upgrades/4.3.2/fix_category_sync_null_values.js
Normal file
@@ -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');
|
||||||
|
},
|
||||||
|
};
|
||||||
Reference in New Issue
Block a user