1
0
Fork 0
mirror of https://codeberg.org/forgejo/forgejo.git synced 2024-12-22 12:54:53 -05:00

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

This commit is contained in:
6543 2020-04-18 23:39:23 +02:00 committed by GitHub
parent 5180deb819
commit 4be7cf0405
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -1614,6 +1614,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).