mirror of
https://codeberg.org/forgejo/forgejo.git
synced 2024-12-20 20:07:03 +01:00
On Repo Deletion: Delete related TrackedTimes too (#11110)
This commit is contained in:
parent
5180deb819
commit
4be7cf0405
1 changed files with 5 additions and 0 deletions
|
@ -1614,6 +1614,11 @@ func DeleteRepository(doer *User, uid, repoID int64) error {
|
||||||
return err
|
return err
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if _, err = sess.In("issue_id", deleteCond).
|
||||||
|
Delete(&TrackedTime{}); err != nil {
|
||||||
|
return err
|
||||||
|
}
|
||||||
|
|
||||||
attachments = attachments[:0]
|
attachments = attachments[:0]
|
||||||
if err = sess.Join("INNER", "issue", "issue.id = attachment.issue_id").
|
if err = sess.Join("INNER", "issue", "issue.id = attachment.issue_id").
|
||||||
Where("issue.repo_id = ?", repoID).
|
Where("issue.repo_id = ?", repoID).
|
||||||
|
|
Loading…
Reference in a new issue