diff options
author | Wenxuan Zhao <viz@linux.com> | 2019-10-16 19:06:28 -0700 |
---|---|---|
committer | Lunny Xiao <xiaolunwen@gmail.com> | 2019-10-17 10:06:28 +0800 |
commit | cf42cb0ae63c733f93b48a868873c8cd5a2b90bb (patch) | |
tree | 54abbd469f6655ea124820ca9821e05af39a9105 /modules | |
parent | c43feedb96bd0ccf238bea59803ea412108b4000 (diff) | |
download | gitea-cf42cb0ae63c733f93b48a868873c8cd5a2b90bb.tar.gz gitea-cf42cb0ae63c733f93b48a868873c8cd5a2b90bb.zip |
Allow externalID to be UUID (#8551)
Signed-off-by: Wenxuan Zhao <viz@linux.com>
Diffstat (limited to 'modules')
-rw-r--r-- | modules/migrations/update.go | 8 |
1 files changed, 1 insertions, 7 deletions
diff --git a/modules/migrations/update.go b/modules/migrations/update.go index df626ddd95..d1465b2baf 100644 --- a/modules/migrations/update.go +++ b/modules/migrations/update.go @@ -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) } |