diff --git a/src/groups.js b/src/groups.js index 23c8fd2d01..b4bebdcc6d 100644 --- a/src/groups.js +++ b/src/groups.js @@ -327,6 +327,16 @@ }, function(next) { db.delete('group:' + groupName + ':members', next); + }, + function(next) { + db.getSetMembers('groups', function(err, groups) { + if (err) { + return next(err); + } + async.each(groups, function(group, next) { + db.setRemove('group:' + group + ':members', groupName, next); + }, next); + }); } ], callback); };