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

fix bug forget to remove Stopwatch when remove repository
This commit is contained in:
linweijie2012 2018-09-14 16:09:25 +08:00 committed by Lunny Xiao
父節點 c145cb745b
當前提交 1e51307466
共有 1 個文件被更改,包括 3 次插入0 次删除

查看文件

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