mirror of
				https://gitee.com/gitea/gitea
				synced 2025-11-04 16:40:24 +08:00 
			
		
		
		
	Fixes: #5783.
This commit is contained in:
		@@ -748,6 +748,9 @@ func createIssueDependencyComment(e *xorm.Session, doer *User, issue *Issue, dep
 | 
				
			|||||||
	if !add {
 | 
						if !add {
 | 
				
			||||||
		cType = CommentTypeRemoveDependency
 | 
							cType = CommentTypeRemoveDependency
 | 
				
			||||||
	}
 | 
						}
 | 
				
			||||||
 | 
						if err = issue.loadRepo(e); err != nil {
 | 
				
			||||||
 | 
							return
 | 
				
			||||||
 | 
						}
 | 
				
			||||||
 | 
					
 | 
				
			||||||
	// Make two comments, one in each issue
 | 
						// Make two comments, one in each issue
 | 
				
			||||||
	_, err = createComment(e, &CreateCommentOptions{
 | 
						_, err = createComment(e, &CreateCommentOptions{
 | 
				
			||||||
 
 | 
				
			|||||||
@@ -19,11 +19,9 @@ func TestCreateIssueDependency(t *testing.T) {
 | 
				
			|||||||
 | 
					
 | 
				
			||||||
	issue1, err := GetIssueByID(1)
 | 
						issue1, err := GetIssueByID(1)
 | 
				
			||||||
	assert.NoError(t, err)
 | 
						assert.NoError(t, err)
 | 
				
			||||||
	issue1.LoadAttributes()
 | 
					 | 
				
			||||||
 | 
					
 | 
				
			||||||
	issue2, err := GetIssueByID(2)
 | 
						issue2, err := GetIssueByID(2)
 | 
				
			||||||
	assert.NoError(t, err)
 | 
						assert.NoError(t, err)
 | 
				
			||||||
	issue2.LoadAttributes()
 | 
					 | 
				
			||||||
 | 
					
 | 
				
			||||||
	// Create a dependency and check if it was successful
 | 
						// Create a dependency and check if it was successful
 | 
				
			||||||
	err = CreateIssueDependency(user1, issue1, issue2)
 | 
						err = CreateIssueDependency(user1, issue1, issue2)
 | 
				
			||||||
 
 | 
				
			|||||||
		Reference in New Issue
	
	Block a user