mirror of
https://gitcode.com/gitea/gitea.git
synced 2025-05-28 21:41:22 +08:00
Allow externalID to be UUID (#8551)
Signed-off-by: Wenxuan Zhao <viz@linux.com>
This commit is contained in:
@ -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)
|
||||
}
|
||||
|
Reference in New Issue
Block a user