diff --git a/src/database/mongo.js b/src/database/mongo.js index f5e9c7706e..0513248b85 100644 --- a/src/database/mongo.js +++ b/src/database/mongo.js @@ -287,14 +287,11 @@ } module.isMemberOfSets = function(sets, value, callback) { - - function iterator(set, next) { module.isSetMember(set, value, next); } async.map(sets, iterator, function(err, result) { - console.log(err, result); callback(err, result); }); diff --git a/src/groups.js b/src/groups.js index 98faf0bcbb..972cb9545f 100644 --- a/src/groups.js +++ b/src/groups.js @@ -146,7 +146,16 @@ if (!exists) { db.incrObjectField('global', 'nextGid', function (err, gid) { db.setObjectField('group:gid', name, gid, function(err) { - db.setObject('gid:' + gid, {}, function(err) { + + var groupData = { + gid: gid, + name: name, + description: description, + deleted: '0', + hidden: '0' + }; + + db.setObject('gid:' + gid, groupData, function(err) { Groups.get(gid, {}, callback);