fix delete comment bug (#4216)

This commit is contained in:
Lunny Xiao 2018-06-12 06:54:30 +08:00 committed by techknowlogick
부모 508092a248
커밋 da898d4066
1개의 변경된 파일4개의 추가작업 그리고 0개의 파일을 삭제

파일 보기

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