Browse Source

fix delete comment bug (#4216)

tags/v1.5.0-dev
Lunny Xiao 6 years ago
parent
commit
da898d4066
1 changed files with 4 additions and 0 deletions
  1. 4
    0
      models/issue_comment.go

+ 4
- 0
models/issue_comment.go View File

@@ -147,6 +147,10 @@ func (c *Comment) AfterLoad(session *xorm.Session) {

// AfterDelete is invoked from XORM after the object is deleted.
func (c *Comment) AfterDelete() {
if c.ID <= 0 {
return
}

_, err := DeleteAttachmentsByComment(c.ID, true)

if err != nil {

Loading…
Cancel
Save