diff options
Diffstat (limited to 'models/migrations/v176.go')
-rw-r--r-- | models/migrations/v176.go | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/models/migrations/v176.go b/models/migrations/v176.go index 0365ae567..cec23e08f 100644 --- a/models/migrations/v176.go +++ b/models/migrations/v176.go @@ -52,7 +52,7 @@ func removeInvalidLabels(x *xorm.Engine) error { INNER JOIN issue on issue.id = il_too_too.issue_id INNER JOIN repository on repository.id = issue.repo_id WHERE - issue.repo_id != label.repo_id OR (label.repo_id = 0 AND label.org_id != repository.owner_id) + (label.org_id = 0 AND issue.repo_id != label.repo_id) OR (label.repo_id = 0 AND label.org_id != repository.owner_id) ) AS il_too )`); err != nil { return err } @@ -65,7 +65,7 @@ func removeInvalidLabels(x *xorm.Engine) error { INNER JOIN issue on issue.id = com.issue_id INNER JOIN repository on repository.id = issue.repo_id WHERE - com.type = ? AND (issue.repo_id != label.repo_id OR (label.repo_id = 0 AND label.org_id != repository.owner_id)) + com.type = ? AND ((label.org_id = 0 AND issue.repo_id != label.repo_id) OR (label.repo_id = 0 AND label.org_id != repository.owner_id)) ) AS il_too)`, 7); err != nil { return err } |