fixes: correct users importing id (#645)

@princemaple could you try out this branch to see if it works on your end?

Former-commit-id: 12c782316c411fa3438f167c12634adffb5e1adf [formerly c613ff6624c55292f532d7772e866cf6c81241f5] [formerly 11f03e54dae28fa773227d85259cfd73c5750137 [formerly 9c42269b62]]
Former-commit-id: 04bcf5803397877d00ba48ea6d0b00246dc07b3d [formerly 4c1bb1e95375777aede2c0911bdfa9ce46273b37]
Former-commit-id: 601db641f7d7b01c14903d0cc27085e3d7080c3d
This commit is contained in:
Henrique Dias 2019-01-26 11:37:33 +00:00 committed by GitHub
parent cc6f2f8bec
commit 367e251a0e
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,