From f286a28568a7ddec659be740e1ffca5b8b34f05e Mon Sep 17 00:00:00 2001 From: zeripath Date: Tue, 23 Mar 2021 19:20:34 +0000 Subject: [PATCH] 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 --- models/consistency.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/models/consistency.go b/models/consistency.go index 9f4cf759c7..c7a70afcdd 100644 --- a/models/consistency.go +++ b/models/consistency.go @@ -368,7 +368,7 @@ func FixCommentTypeLabelWithOutsideLabels() (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)")). 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", "repository", "issue.repo_id = repository.id"). Count(new(IssueLabel))