Skip to content

Commit 21357a4

Browse files
adelowojonasfranz
authored andcommitted
fix nil pointer when adding a due date (#5587)
* fix nil pointer * remove nil check and just call loadRepo regardless
1 parent a82ba73 commit 21357a4

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

models/issue_comment.go

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -708,6 +708,10 @@ func createDeadlineComment(e *xorm.Session, doer *User, issue *Issue, newDeadlin
708708
content = newDeadlineUnix.Format("2006-01-02") + "|" + issue.DeadlineUnix.Format("2006-01-02")
709709
}
710710

711+
if err := issue.LoadRepo(); err != nil {
712+
return nil, err
713+
}
714+
711715
return createComment(e, &CreateCommentOptions{
712716
Type: commentType,
713717
Doer: doer,

0 commit comments

Comments
 (0)