Node.js based forum software built for the modern web
fix: #7448
Barış Soner Uşaklı4732bed3db2a
diff --git a/src/categories/create.js b/src/categories/create.jsindex e144bcad05..e00fd9362f 100644--- a/src/categories/create.js+++ b/src/categories/create.js@@ -153,7 +153,7 @@ module.exports = function (Categories) {const oldParent = parseInt(destination.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.sortedSetAdd, 'cid:' + newParent + ':children', results.source.order, toCid));tasks.push(function (next) {