Quellcode durchsuchen

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

tags/v1.15.0-rc1
Lunny Xiao vor 3 Jahren
Ursprung
Commit
143071ee41
Es ist kein Account mit der E-Mail-Adresse des Committers verbunden
1 geänderte Dateien mit 3 neuen und 0 gelöschten Zeilen
  1. 3
    0
      models/issue_xref.go

+ 3
- 0
models/issue_xref.go Datei anzeigen

@@ -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 ""

Laden…
Abbrechen
Speichern