Skip to content

Commit 6eb8910

Browse files
committed
remove nil check and just call loadRepo regardless
1 parent 869298b commit 6eb8910

File tree

1 file changed

+2
-4
lines changed

1 file changed

+2
-4
lines changed

models/issue_comment.go

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -708,10 +708,8 @@ 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 issue.Repo == nil {
712-
if err := issue.LoadRepo(); err != nil {
713-
return nil, err
714-
}
711+
if err := issue.LoadRepo(); err != nil {
712+
return nil, err
715713
}
716714

717715
return createComment(e, &CreateCommentOptions{

0 commit comments

Comments
 (0)