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

tokarchuk/v1.17
6543 5 years ago committed by GitHub
parent 5180deb819
commit 4be7cf0405
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
  1. 5
      models/repo.go

@ -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