fix delete comment bug (#4216)

This commit is contained in:
Lunny Xiao 2018-06-12 06:54:30 +08:00 提交者 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 {