fixes: correct users importing id (#645)

@princemaple could you try out this branch to see if it works on your end?
This commit is contained in:
Henrique Dias authored and GitHub committed 2019-01-26 11:37:33 +00:00
1 parent dadfffbd31
commit 9c42269b62
2 files changed
+4 -1

No files matched your search

+4
View File
@@ -70,6 +70,10 @@ list or set it to 0.`,
checkErr(usernameConflictError(user.Username, conflictuous.ID, user.ID)) 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) err = d.store.Users.Save(user)
-1
View File
@@ -55,7 +55,6 @@ func convertUsersToNew(old []*oldUser) ([]*users.User, error) {
for _, oldUser := range old { for _, oldUser := range old {
user := &users.User{ user := &users.User{
ID: uint(oldUser.ID),
Username: oldUser.Username, Username: oldUser.Username,
Password: oldUser.Password, Password: oldUser.Password,
Scope: oldUser.Scope, Scope: oldUser.Scope,