fix challenges members migration

This commit is contained in:
Matteo Pagliazzi
2016-05-05 09:28:07 +02:00
parent bb2dd8ca08
commit ebf3a0979f

View File

@@ -86,6 +86,7 @@ function processChallenges (afterId) {
lastChallenge = oldChallenges[oldChallenges.length - 1]._id;
}
oldChallenges.forEach(function (oldChallenge) {
// Tyler Renelle
oldChallenge.members.forEach(function (id, index) {
if (id === '9') {
@@ -93,7 +94,6 @@ function processChallenges (afterId) {
}
});
oldChallenges.forEach(function (oldChallenge) {
promises.push(newUserCollection.updateMany({
_id: {$in: oldChallenge.members},
}, {