Browse Source

fix bug forget to remove Stopwatch when remove repository (#4933)

fix bug forget to remove Stopwatch when remove repository
release/v1.5
linweijie2012 6 years ago
committed by Lunny Xiao
parent
commit
1e51307466
  1. 3
      models/repo.go

3
models/repo.go

@ -1852,6 +1852,9 @@ func DeleteRepository(doer *User, uid, repoID int64) error {
if _, err = sess.In("issue_id", issueIDs).Delete(&IssueWatch{}); err != nil {
return err
}
if _, err = sess.In("issue_id", issueIDs).Delete(&Stopwatch{}); err != nil {
return err
}
attachments := make([]*Attachment, 0, 5)
if err = sess.

Loading…
Cancel
Save