v3 migration: fixes

This commit is contained in:
Matteo Pagliazzi
2016-05-01 23:54:58 +02:00
parent 60eefde15f
commit fbce7e65ab
5 changed files with 54 additions and 19 deletions

View File

@@ -114,7 +114,8 @@ function processChallenges (afterId) {
newChallenge.createdAt = createdAt;
oldTasks.forEach(function (oldTask) {
oldTask._id = oldTask.id; // keep the old uuid unless duplicated
oldTask._id = uuid.v4(); // TODO keep the old uuid unless duplicated
oldTask.legacyId = oldTask.id; // store the old task id
delete oldTask.id;
oldTask.tags = _.map(oldTask.tags || {}, function (tagPresent, tagId) {