diff options
author | Lunny Xiao <xiaolunwen@gmail.com> | 2021-05-12 04:43:35 +0800 |
---|---|---|
committer | GitHub <noreply@github.com> | 2021-05-11 21:43:35 +0100 |
commit | 143071ee4173a2053a9693274cddb6636963c1e3 (patch) | |
tree | b0d0c8cd72ade867f3b82f859c91410d509bdd9d /models/issue_xref.go | |
parent | fc6501e4e0e1ca638d842e95221906632b6bc901 (diff) | |
download | gitea-143071ee4173a2053a9693274cddb6636963c1e3.tar.gz gitea-143071ee4173a2053a9693274cddb6636963c1e3.zip |
don't record error when loading ref comment but ref comment id is zero (#15820)
Diffstat (limited to 'models/issue_xref.go')
-rw-r--r-- | models/issue_xref.go | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/models/issue_xref.go b/models/issue_xref.go index 8d3caba8c0..fc8dd70f77 100644 --- a/models/issue_xref.go +++ b/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 func (comment *Comment) RefCommentHTMLURL() string { + if comment.RefCommentID == 0 { + return "" + } if err := comment.LoadRefComment(); err != nil { // Silently dropping errors :unamused: log.Error("LoadRefComment(%d): %v", comment.RefCommentID, err) return "" |