Browse Source

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

tags/v1.13.0-dev
6543 4 years ago
parent
commit
4be7cf0405
No account linked to committer's email address
1 changed files with 5 additions and 0 deletions
  1. 5
    0
      models/repo.go

+ 5
- 0
models/repo.go 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).

Loading…
Cancel
Save