Fix user mapping for migration

This commit is contained in:
Jonathan Cremin 2016-08-07 17:49:27 +01:00
parent 889dc02945
commit c7c8b3621e
5 changed files with 10 additions and 6 deletions

View file

@ -50,7 +50,7 @@ co(function *sync() {
continue;
}
const oldId = user._id.toString();
const mongoId = user._id.toString();
const newUser = yield models.user.create({
email: user.email,
@ -62,7 +62,7 @@ co(function *sync() {
deletedAt: user.status === 'deleted' ? new Date().getTime() : null,
createdAt: user.createdAt,
updatedAt: user.createdAt,
oldId,
mongoId,
}, {
include: [models.activation],
});