diff options
author | guillep2k <18600385+guillep2k@users.noreply.github.com> | 2019-10-22 05:12:10 -0300 |
---|---|---|
committer | zeripath <art27@cantab.net> | 2019-10-22 09:12:10 +0100 |
commit | 0032278a46302d9977ce46c975d28aa7f98ade04 (patch) | |
tree | 005afea9e0c792fe08e92e89f558c490f22b183c /models | |
parent | ccf5298a2c4e9137fbf070e07111d7e90ae5f8ab (diff) | |
download | gitea-0032278a46302d9977ce46c975d28aa7f98ade04.tar.gz gitea-0032278a46302d9977ce46c975d28aa7f98ade04.zip |
Allow externalID to be UUID (#8551) (#8624)
Signed-off-by: Wenxuan Zhao <viz@linux.com>
Diffstat (limited to 'models')
-rw-r--r-- | models/external_login_user.go | 2 | ||||
-rw-r--r-- | models/issue.go | 2 | ||||
-rw-r--r-- | models/issue_comment.go | 2 | ||||
-rw-r--r-- | models/release.go | 2 |
4 files changed, 4 insertions, 4 deletions
diff --git a/models/external_login_user.go b/models/external_login_user.go index 726e09f27a..265d855ccf 100644 --- a/models/external_login_user.go +++ b/models/external_login_user.go @@ -168,7 +168,7 @@ func FindExternalUsersByProvider(opts FindExternalUserOptions) ([]ExternalLoginU } // UpdateMigrationsByType updates all migrated repositories' posterid from gitServiceType to replace originalAuthorID to posterID -func UpdateMigrationsByType(tp structs.GitServiceType, externalUserID, userID int64) error { +func UpdateMigrationsByType(tp structs.GitServiceType, externalUserID string, userID int64) error { if err := UpdateIssuesMigrationsByType(tp, externalUserID, userID); err != nil { return err } diff --git a/models/issue.go b/models/issue.go index fc675a3ffb..e6796db9fc 100644 --- a/models/issue.go +++ b/models/issue.go @@ -1950,7 +1950,7 @@ func (issue *Issue) ResolveMentionsByVisibility(ctx DBContext, doer *User, menti } // UpdateIssuesMigrationsByType updates all migrated repositories' issues from gitServiceType to replace originalAuthorID to posterID -func UpdateIssuesMigrationsByType(gitServiceType structs.GitServiceType, originalAuthorID, posterID int64) error { +func UpdateIssuesMigrationsByType(gitServiceType structs.GitServiceType, originalAuthorID string, posterID int64) error { _, err := x.Table("issue"). Where("repo_id IN (SELECT id FROM repository WHERE original_service_type = ?)", gitServiceType). And("original_author_id = ?", originalAuthorID). diff --git a/models/issue_comment.go b/models/issue_comment.go index 3a090c3b19..2d5f2839bf 100644 --- a/models/issue_comment.go +++ b/models/issue_comment.go @@ -1025,7 +1025,7 @@ func FetchCodeComments(issue *Issue, currentUser *User) (CodeComments, error) { } // UpdateCommentsMigrationsByType updates comments' migrations information via given git service type and original id and poster id -func UpdateCommentsMigrationsByType(tp structs.GitServiceType, originalAuthorID, posterID int64) error { +func UpdateCommentsMigrationsByType(tp structs.GitServiceType, originalAuthorID string, posterID int64) error { _, err := x.Table("comment"). Where(builder.In("issue_id", builder.Select("issue.id"). diff --git a/models/release.go b/models/release.go index 03685e0a44..f43d81d822 100644 --- a/models/release.go +++ b/models/release.go @@ -369,7 +369,7 @@ func SyncReleasesWithTags(repo *Repository, gitRepo *git.Repository) error { } // UpdateReleasesMigrationsByType updates all migrated repositories' releases from gitServiceType to replace originalAuthorID to posterID -func UpdateReleasesMigrationsByType(gitServiceType structs.GitServiceType, originalAuthorID, posterID int64) error { +func UpdateReleasesMigrationsByType(gitServiceType structs.GitServiceType, originalAuthorID string, posterID int64) error { _, err := x.Table("release"). Where("repo_id IN (SELECT id FROM repository WHERE original_service_type = ?)", gitServiceType). And("original_author_id = ?", originalAuthorID). |