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