fix: delete attachment after remove comment.
This commit is contained in:
parent
2831267db1
commit
691fbdf1d3
5 changed files with 11 additions and 7 deletions
|
@ -462,7 +462,9 @@ func DeleteComment(comment *Comment) error {
|
|||
return err
|
||||
}
|
||||
|
||||
if _, err := sess.Id(comment.ID).Delete(new(Comment)); err != nil {
|
||||
if _, err := sess.Delete(&Comment{
|
||||
ID: comment.ID,
|
||||
}); err != nil {
|
||||
return err
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue