diff --git a/src/categories.js b/src/categories.js index 8043401830..e33d8a7aa3 100644 --- a/src/categories.js +++ b/src/categories.js @@ -402,9 +402,10 @@ var db = require('./database'), Categories.getCategoriesData(cids, next); }, function (categories, next) { + // Filter categories to isolate children, and remove disabled categories async.map(cids, function(cid, next) { next(null, categories.filter(function(category) { - return parseInt(category.parentCid, 10) === parseInt(cid, 10); + return parseInt(category.parentCid, 10) === parseInt(cid, 10) && !category.disabled; })); }, next); } diff --git a/src/categories/update.js b/src/categories/update.js index fa04d99deb..002628d723 100644 --- a/src/categories/update.js +++ b/src/categories/update.js @@ -13,7 +13,6 @@ module.exports = function(Categories) { function updateCategory(cid, next) { var category = modified[cid]; var fields = Object.keys(category); - console.log('updating', cid, 'fields:', fields); async.each(fields, function(key, next) { updateCategoryField(cid, key, category[key], next);