diff options
author | Lanre Adelowo <adelowomailbox@gmail.com> | 2018-12-27 16:02:43 +0100 |
---|---|---|
committer | Jonas Franz <info@jonasfranz.software> | 2018-12-27 16:02:43 +0100 |
commit | 21357a4ae04068a7ebe5ee5bc800ef36e11fd614 (patch) | |
tree | 2380d1face17aaf2c6fb09b0c6227d0b44d7f74c /models/issue_comment.go | |
parent | a82ba7334662766f5fbd51539efce67d4fc84100 (diff) | |
download | gitea-21357a4ae04068a7ebe5ee5bc800ef36e11fd614.tar.gz gitea-21357a4ae04068a7ebe5ee5bc800ef36e11fd614.zip |
fix nil pointer when adding a due date (#5587)
* fix nil pointer
* remove nil check and just call loadRepo regardless
Diffstat (limited to 'models/issue_comment.go')
-rw-r--r-- | models/issue_comment.go | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/models/issue_comment.go b/models/issue_comment.go index 577de1d84d..651cbdfad1 100644 --- a/models/issue_comment.go +++ b/models/issue_comment.go @@ -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, |