diff options
author | Harshit Bansal <harshitbansal2015@gmail.com> | 2019-01-27 17:01:40 +0530 |
---|---|---|
committer | Lauris BH <lauris@nix.lv> | 2019-01-27 13:31:40 +0200 |
commit | 7e8242ddb116b6748b008c500479ca3805107959 (patch) | |
tree | a71525a2c068af3931b2e79c64233d8254b89bd6 /models/issue_comment.go | |
parent | 2d8520d039a8458a9286675d4382e38f730437e3 (diff) | |
download | gitea-7e8242ddb116b6748b008c500479ca3805107959.tar.gz gitea-7e8242ddb116b6748b008c500479ca3805107959.zip |
Fix an error while adding a dependency via UI. (#5862)
Fixes: #5783
Diffstat (limited to 'models/issue_comment.go')
-rw-r--r-- | models/issue_comment.go | 3 |
1 files changed, 3 insertions, 0 deletions
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{ |