Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix an error while adding a dependency via UI. #5862

Merged
merged 2 commits into from
Jan 27, 2019
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 3 additions & 0 deletions models/issue_comment.go
Original file line number Diff line number Diff line change
Expand Up @@ -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{
Expand Down
2 changes: 0 additions & 2 deletions models/issue_dependency_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -19,11 +19,9 @@ func TestCreateIssueDependency(t *testing.T) {

issue1, err := GetIssueByID(1)
assert.NoError(t, err)
issue1.LoadAttributes()

issue2, err := GetIssueByID(2)
assert.NoError(t, err)
issue2.LoadAttributes()

// Create a dependency and check if it was successful
err = CreateIssueDependency(user1, issue1, issue2)
Expand Down