Browse Source

fix nil pointer when adding a due date (#5587)

* fix nil pointer

* remove nil check and just call loadRepo regardless
tags/v1.7.0-dev
Lanre Adelowo Jonas Franz 6 years ago
parent
commit
7d9d7757e1
1 changed files with 4 additions and 0 deletions
  1. +4
    -0
      models/issue_comment.go

+ 4
- 0
models/issue_comment.go View File

@@ -708,6 +708,10 @@ func createDeadlineComment(e *xorm.Session, doer *User, issue *Issue, newDeadlin
content = newDeadlineUnix.Format("2006-01-02") + "|" + issue.DeadlineUnix.Format("2006-01-02")
}

if err := issue.LoadRepo(); err != nil {
return nil, err
}

return createComment(e, &CreateCommentOptions{
Type: commentType,
Doer: doer,


Loading…
Cancel
Save