1
0
mirror of https://github.com/go-gitea/gitea.git synced 2024-11-04 08:17:24 -05:00

Fix unchecked error bug (#2110)

This commit is contained in:
Ethan Koenig 2017-07-03 21:30:41 -04:00 committed by Lunny Xiao
parent 2fd039864b
commit a52cd59727

View File

@ -668,7 +668,10 @@ func DeleteComment(comment *Comment) error {
return err return err
} }
} }
sess.Where("comment_id = ?", comment.ID).Cols("is_deleted").Update(&Action{IsDeleted: true})
if _, err := sess.Where("comment_id = ?", comment.ID).Cols("is_deleted").Update(&Action{IsDeleted: true}); err != nil {
return err
}
return sess.Commit() return sess.Commit()
} }