Skip to content

Commit

Permalink
fix nil pointer when adding a due date (#5587)
Browse files Browse the repository at this point in the history
* fix nil pointer

* remove nil check and just call loadRepo regardless
  • Loading branch information
adelowo authored and jonasfranz committed Dec 27, 2018
1 parent a82ba73 commit 21357a4
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions models/issue_comment.go
Original file line number Diff line number Diff line change
Expand Up @@ -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,
Expand Down

0 comments on commit 21357a4

Please sign in to comment.