Allow externalID to be UUID (#8551)
Signed-off-by: Wenxuan Zhao <viz@linux.com>
This commit is contained in:
parent
c43feedb96
commit
cf42cb0ae6
6 changed files with 6 additions and 16 deletions
|
@ -5,8 +5,6 @@
|
|||
package migrations
|
||||
|
||||
import (
|
||||
"strconv"
|
||||
|
||||
"code.gitea.io/gitea/models"
|
||||
"code.gitea.io/gitea/modules/log"
|
||||
"code.gitea.io/gitea/modules/structs"
|
||||
|
@ -40,11 +38,7 @@ func updateMigrationPosterIDByGitService(tp structs.GitServiceType) error {
|
|||
}
|
||||
|
||||
for _, user := range users {
|
||||
externalUserID, err := strconv.ParseInt(user.ExternalID, 10, 64)
|
||||
if err != nil {
|
||||
log.Warn("Parse externalUser %#v 's userID failed: %v", user, err)
|
||||
continue
|
||||
}
|
||||
externalUserID := user.ExternalID
|
||||
if err := models.UpdateMigrationsByType(tp, externalUserID, user.UserID); err != nil {
|
||||
log.Error("UpdateMigrationsByType type %s external user id %v to local user id %v failed: %v", tp.Name(), user.ExternalID, user.UserID, err)
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue