1
1
mirror of https://github.com/go-gitea/gitea synced 2024-12-26 10:34:26 +00:00

Fix consistency check (#15120) (#15128)

In my last fix I missed adding the label_ prefix to the
consistency check count.

Signed-off-by: Andrew Thornton <art27@cantab.net>
This commit is contained in:
zeripath 2021-03-23 19:20:34 +00:00 committed by GitHub
parent b5c4cb1bde
commit f286a28568
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -368,7 +368,7 @@ func FixCommentTypeLabelWithOutsideLabels() (int64, error) {
func CountIssueLabelWithOutsideLabels() (int64, error) { func CountIssueLabelWithOutsideLabels() (int64, error) {
return x.Where(builder.Expr("issue.repo_id != label.repo_id OR (label.repo_id = 0 AND repository.owner_id != label.org_id)")). return x.Where(builder.Expr("issue.repo_id != label.repo_id OR (label.repo_id = 0 AND repository.owner_id != label.org_id)")).
Table("issue_label"). Table("issue_label").
Join("inner", "label", "issue_label.id = label.id "). Join("inner", "label", "issue_label.label_id = label.id ").
Join("inner", "issue", "issue.id = issue_label.issue_id "). Join("inner", "issue", "issue.id = issue_label.issue_id ").
Join("inner", "repository", "issue.repo_id = repository.id"). Join("inner", "repository", "issue.repo_id = repository.id").
Count(new(IssueLabel)) Count(new(IssueLabel))