From be316ff6022af24db625b0b11074ac2f0d6142d8 Mon Sep 17 00:00:00 2001 From: Baris Soner Usakli Date: Sun, 5 Jan 2014 20:44:06 -0500 Subject: [PATCH] fixed mongo listRemoveAll --- src/database/mongo.js | 3 +++ src/routes/debug.js | 1 - 2 files changed, 3 insertions(+), 1 deletion(-) diff --git a/src/database/mongo.js b/src/database/mongo.js index fd07ad7f2a..5f27c9da90 100644 --- a/src/database/mongo.js +++ b/src/database/mongo.js @@ -722,6 +722,9 @@ } module.listRemoveAll = function(key, value, callback) { + if(value !== null && value !== undefined) { + value = value.toString(); + } db.collection('objects').update({_key: key }, { $pull: { array: value } }, function(err, result) { if(err) { if(callback) { diff --git a/src/routes/debug.js b/src/routes/debug.js index 6bbd06ce9d..d397fa2992 100644 --- a/src/routes/debug.js +++ b/src/routes/debug.js @@ -89,7 +89,6 @@ var DebugRoute = function(app) { }); res.send(); }); - }); };