fixes: correct users importing id (#645)

@princemaple could you try out this branch to see if it works on your end?
pull/649/head
Henrique Dias 2019-01-26 11:37:33 +00:00 committed by GitHub
parent dadfffbd31
commit 9c42269b62
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 4 additions and 1 deletions

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)

View File

@ -55,7 +55,6 @@ func convertUsersToNew(old []*oldUser) ([]*users.User, error) {
for _, oldUser := range old {
user := &users.User{
ID: uint(oldUser.ID),
Username: oldUser.Username,
Password: oldUser.Password,
Scope: oldUser.Scope,