v3 migration: correctly migrate challenges tasks

This commit is contained in:
Matteo Pagliazzi
2016-05-03 23:27:24 +02:00
parent c218a2cbdf
commit e5e4bb5823
4 changed files with 58 additions and 5 deletions

View File

@@ -144,6 +144,13 @@ function processGroups (afterId) {
}
if (oldGroup.members) {
// Tyler Renelle
oldGroup.members.forEach(function (id, index) {
if (id === '9') {
oldGroup.members[index] = '00000000-0000-4000-9000-000000000000';
}
});
promises.push(newUserCollection.updateMany({
_id: {$in: oldGroup.members},
}, updateMembers, {multi: true}));