Skip to content

Commit 6264fc4

Browse files
committed
try try again
Signed-off-by: Andrew Thornton <[email protected]>
1 parent 31b0f60 commit 6264fc4

File tree

1 file changed

+10
-10
lines changed

1 file changed

+10
-10
lines changed

models/repo_transfer.go

Lines changed: 10 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -327,26 +327,26 @@ func TransferOwnership(doer *User, newOwnerName string, repo *Repository) (err e
327327

328328
// Delete labels that belong to the old organization and comments that added these labels
329329
if oldOwner.IsOrganization() {
330-
if _, err := sess.Exec(`DELETE FROM issue_label AS il WHERE il.id IN (
330+
if _, err := sess.Exec(`DELETE FROM issue_label WHERE issue_label.id IN (
331331
SELECT il_too.id FROM (
332-
SELECT issue_label.id
333-
FROM issue_label
334-
INNER JOIN label ON issue_label.id = label.id
335-
INNER JOIN issue on issue.id = issue_label.issue_id
332+
SELECT il_too_too.id
333+
FROM issue_label AS il_too_too
334+
INNER JOIN label ON il_too_too.id = label.id
335+
INNER JOIN issue on issue.id = il_too_too.issue_id
336336
WHERE
337337
issue.repo_id = ? AND (issue.repo_id != label.repo_id OR (label.repo_id = 0 AND label.org_id != ?))
338338
) AS il_too )`, repo.ID, newOwner.ID); err != nil {
339339
return fmt.Errorf("Unable to remove old org labels: %v", err)
340340
}
341341

342-
if _, err := sess.Exec(`DELETE FROM comment AS com WHERE com.id IN (
342+
if _, err := sess.Exec(`DELETE FROM comment WHERE comment.id IN (
343343
SELECT il_too.id FROM (
344344
SELECT comment.id
345-
FROM comment
346-
INNER JOIN label ON comment.label_id = label.id
347-
INNER JOIN issue on issue.id = comment.issue_id
345+
FROM comment AS com
346+
INNER JOIN label ON com.label_id = label.id
347+
INNER JOIN issue on issue.id = com.issue_id
348348
WHERE
349-
comment.type = ? AND issue.repo_id = ? AND (issue.repo_id != label.repo_id OR (label.repo_id = 0 AND label.org_id != ?))
349+
com.type = ? AND issue.repo_id = ? AND (issue.repo_id != label.repo_id OR (label.repo_id = 0 AND label.org_id != ?))
350350
) AS il_too)`, CommentTypeLabel, repo.ID, newOwner.ID); err != nil {
351351
return fmt.Errorf("Unable to remove old org label comments: %v", err)
352352
}

0 commit comments

Comments
 (0)