Skip to content

Commit 74b8996

Browse files
committed
On Repo Deletion: Delete related TrackedTimes too (go-gitea#11110)
1 parent d9875ff commit 74b8996

1 file changed

Lines changed: 5 additions & 0 deletions

File tree

models/repo.go

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1968,6 +1968,11 @@ func DeleteRepository(doer *User, uid, repoID int64) error {
19681968
return err
19691969
}
19701970

1971+
if _, err = sess.In("issue_id", deleteCond).
1972+
Delete(&TrackedTime{}); err != nil {
1973+
return err
1974+
}
1975+
19711976
attachments = attachments[:0]
19721977
if err = sess.Join("INNER", "issue", "issue.id = attachment.issue_id").
19731978
Where("issue.repo_id = ?", repoID).

0 commit comments

Comments
 (0)