From 3d5e72bbc8c64a335ed028204600e4a9fe590088 Mon Sep 17 00:00:00 2001 From: barisusakli Date: Mon, 27 Oct 2014 02:58:20 -0400 Subject: [PATCH] fix null parents --- src/categories.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/categories.js b/src/categories.js index 797a3cc823..f3c9ee7316 100644 --- a/src/categories.js +++ b/src/categories.js @@ -315,8 +315,8 @@ var db = require('./database'), } async.map(categories, function(category, next) { - if (!category) { - return next(null, category); + if (!category || !parseInt(category.cid, 10)) { + return next(null, null); } category.name = validator.escape(category.name); category.description = validator.escape(category.description);