mirror of
https://github.com/NodeBB/NodeBB.git
synced 2025-10-26 16:46:12 +01:00
@@ -153,7 +153,7 @@ module.exports = function (Categories) {
|
|||||||
|
|
||||||
const oldParent = parseInt(destination.parentCid, 10) || 0;
|
const oldParent = parseInt(destination.parentCid, 10) || 0;
|
||||||
const newParent = parseInt(results.source.parentCid, 10) || 0;
|
const newParent = parseInt(results.source.parentCid, 10) || 0;
|
||||||
if (copyParent) {
|
if (copyParent && newParent !== parseInt(toCid, 10)) {
|
||||||
tasks.push(async.apply(db.sortedSetRemove, 'cid:' + oldParent + ':children', toCid));
|
tasks.push(async.apply(db.sortedSetRemove, 'cid:' + oldParent + ':children', toCid));
|
||||||
tasks.push(async.apply(db.sortedSetAdd, 'cid:' + newParent + ':children', results.source.order, toCid));
|
tasks.push(async.apply(db.sortedSetAdd, 'cid:' + newParent + ':children', results.source.order, toCid));
|
||||||
tasks.push(function (next) {
|
tasks.push(function (next) {
|
||||||
|
|||||||
Reference in New Issue
Block a user