1
0
mirror of https://github.com/go-gitea/gitea.git synced 2024-12-04 14:46:57 -05:00

On Repo Deletion: Delete related TrackedTimes too (#11110) (#11125)

This commit is contained in:
6543 2020-04-19 04:39:48 +02:00 committed by GitHub
parent d9875ff2e1
commit 245d6ebda5
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -1968,6 +1968,11 @@ func DeleteRepository(doer *User, uid, repoID int64) error {
return err
}
if _, err = sess.In("issue_id", deleteCond).
Delete(&TrackedTime{}); err != nil {
return err
}
attachments = attachments[:0]
if err = sess.Join("INNER", "issue", "issue.id = attachment.issue_id").
Where("issue.repo_id = ?", repoID).