Fix unchecked error bug (#2110)

This commit is contained in:
Ethan Koenig authored and Lunny Xiao committed 2017-07-04 09:30:41 +08:00
1 parent 2fd039864b
commit a52cd59727
1 file changed
+4 -1
+4 -1
View File
@@ -668,7 +668,10 @@ func DeleteComment(comment *Comment) error {
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()
}