mirror of
https://codeberg.org/forgejo/forgejo.git
synced 2025-05-14 05:52:43 +00:00
Fix potential bugs (#10513)
* use e if it is an option * potential nil so check err first * check err first * m == nil already checked
This commit is contained in:
parent
15fbf509d3
commit
e57ac841de
7 changed files with 14 additions and 10 deletions
|
@ -396,7 +396,7 @@ func (n *Notification) loadIssue(e Engine) (err error) {
|
|||
|
||||
func (n *Notification) loadComment(e Engine) (err error) {
|
||||
if n.Comment == nil && n.CommentID > 0 {
|
||||
n.Comment, err = GetCommentByID(n.CommentID)
|
||||
n.Comment, err = getCommentByID(e, n.CommentID)
|
||||
if err != nil {
|
||||
return fmt.Errorf("GetCommentByID [%d] for issue ID [%d]: %v", n.CommentID, n.IssueID, err)
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue