fix delete comment bug (#4216)

Este commit está contenido en:
Lunny Xiao 2018-06-12 06:54:30 +08:00 cometido por techknowlogick
padre 508092a248
commit da898d4066
Se han modificado 1 ficheros con 4 adiciones y 0 borrados

Ver fichero

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