mirror of
https://github.com/HabitRPG/habitica.git
synced 2025-12-18 15:17:25 +01:00
fix challenges members migration
This commit is contained in:
@@ -86,6 +86,7 @@ function processChallenges (afterId) {
|
|||||||
lastChallenge = oldChallenges[oldChallenges.length - 1]._id;
|
lastChallenge = oldChallenges[oldChallenges.length - 1]._id;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
oldChallenges.forEach(function (oldChallenge) {
|
||||||
// Tyler Renelle
|
// Tyler Renelle
|
||||||
oldChallenge.members.forEach(function (id, index) {
|
oldChallenge.members.forEach(function (id, index) {
|
||||||
if (id === '9') {
|
if (id === '9') {
|
||||||
@@ -93,7 +94,6 @@ function processChallenges (afterId) {
|
|||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
|
||||||
oldChallenges.forEach(function (oldChallenge) {
|
|
||||||
promises.push(newUserCollection.updateMany({
|
promises.push(newUserCollection.updateMany({
|
||||||
_id: {$in: oldChallenge.members},
|
_id: {$in: oldChallenge.members},
|
||||||
}, {
|
}, {
|
||||||
|
|||||||
Reference in New Issue
Block a user