don't record error when loading ref comment but ref comment id is zero (#15820)

tokarchuk/v1.17
Lunny Xiao 4 years ago committed by GitHub
parent fc6501e4e0
commit 143071ee41
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
  1. 3
      models/issue_xref.go

@ -290,6 +290,9 @@ func CommentTypeIsRef(t CommentType) bool {
// RefCommentHTMLURL returns the HTML URL for the comment that created this reference // RefCommentHTMLURL returns the HTML URL for the comment that created this reference
func (comment *Comment) RefCommentHTMLURL() string { func (comment *Comment) RefCommentHTMLURL() string {
if comment.RefCommentID == 0 {
return ""
}
if err := comment.LoadRefComment(); err != nil { // Silently dropping errors :unamused: if err := comment.LoadRefComment(); err != nil { // Silently dropping errors :unamused:
log.Error("LoadRefComment(%d): %v", comment.RefCommentID, err) log.Error("LoadRefComment(%d): %v", comment.RefCommentID, err)
return "" return ""

Loading…
Cancel
Save