fix: import users with non existing id

License: MIT
Signed-off-by: Henrique Dias <hacdias@gmail.com>
This commit is contained in:
Henrique Dias 2019-01-26 09:33:48 +00:00
parent 265f588dd3
commit 84ba8debad

View File

@ -70,6 +70,10 @@ list or set it to 0.`,
checkErr(usernameConflictError(user.Username, conflictuous.ID, user.ID))
}
}
} else {
// If it doesn't exist, set the ID to 0 to automatically get a new
// one that make sense in this DB.
user.ID = 0
}
err = d.store.Users.Save(user)