Browse Source

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

Fixes: #5783
for-closed-social
Harshit Bansal 5 years ago
committed by Lauris BH
parent
commit
7e8242ddb1
2 changed files with 3 additions and 2 deletions
  1. +3
    -0
      models/issue_comment.go
  2. +0
    -2
      models/issue_dependency_test.go

+ 3
- 0
models/issue_comment.go View File

@ -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{

+ 0
- 2
models/issue_dependency_test.go View File

@ -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)

Loading…
Cancel
Save