From 7e8242ddb116b6748b008c500479ca3805107959 Mon Sep 17 00:00:00 2001 From: Harshit Bansal Date: Sun, 27 Jan 2019 17:01:40 +0530 Subject: Fix an error while adding a dependency via UI. (#5862) Fixes: #5783 --- models/issue_comment.go | 3 +++ 1 file changed, 3 insertions(+) (limited to 'models/issue_comment.go') diff --git a/models/issue_comment.go b/models/issue_comment.go index 6c87650a3c..fb379fa941 100644 --- a/models/issue_comment.go +++ b/models/issue_comment.go @@ -749,6 +749,9 @@ func createIssueDependencyComment(e *xorm.Session, doer *User, issue *Issue, dep if !add { cType = CommentTypeRemoveDependency } + if err = issue.loadRepo(e); err != nil { + return + } // Make two comments, one in each issue _, err = createComment(e, &CreateCommentOptions{ -- cgit v1.2.3