summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorEthan Koenig <etk39@cornell.edu>2017-07-03 21:30:41 -0400
committerLunny Xiao <xiaolunwen@gmail.com>2017-07-04 09:30:41 +0800
commita52cd59727f438132a13a33c8941aa05e397331e (patch)
tree2f563f1717babac2508264fded4ff219a0a9282f
parent2fd039864b1748ef577691057a9ab7961bcaec23 (diff)
downloadgitea-a52cd59727f438132a13a33c8941aa05e397331e.tar.gz
gitea-a52cd59727f438132a13a33c8941aa05e397331e.zip
Fix unchecked error bug (#2110)
-rw-r--r--models/issue_comment.go5
1 files changed, 4 insertions, 1 deletions
diff --git a/models/issue_comment.go b/models/issue_comment.go
index de963f45f6..326676ecfc 100644
--- a/models/issue_comment.go
+++ b/models/issue_comment.go
@@ -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()
}