Skip to content

Commit a52cd59

Browse files
ethantkoeniglunny
authored andcommitted
Fix unchecked error bug (#2110)
1 parent 2fd0398 commit a52cd59

File tree

1 file changed

+4
-1
lines changed

1 file changed

+4
-1
lines changed

models/issue_comment.go

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -668,7 +668,10 @@ func DeleteComment(comment *Comment) error {
668668
return err
669669
}
670670
}
671-
sess.Where("comment_id = ?", comment.ID).Cols("is_deleted").Update(&Action{IsDeleted: true})
671+
672+
if _, err := sess.Where("comment_id = ?", comment.ID).Cols("is_deleted").Update(&Action{IsDeleted: true}); err != nil {
673+
return err
674+
}
672675

673676
return sess.Commit()
674677
}

0 commit comments

Comments
 (0)