mirror of
				https://github.com/go-gitea/gitea.git
				synced 2025-10-31 21:28:11 +09:00 
			
		
		
		
	Add context parameter to some database functions (#26055)
To avoid deadlock problem, almost database related functions should be have ctx as the first parameter. This PR do a refactor for some of these functions.
This commit is contained in:
		| @@ -39,7 +39,7 @@ func TestIssueList_LoadAttributes(t *testing.T) { | ||||
| 		unittest.AssertExistsAndLoadBean(t, &issues_model.Issue{ID: 4}), | ||||
| 	} | ||||
|  | ||||
| 	assert.NoError(t, issueList.LoadAttributes()) | ||||
| 	assert.NoError(t, issueList.LoadAttributes(db.DefaultContext)) | ||||
| 	for _, issue := range issueList { | ||||
| 		assert.EqualValues(t, issue.RepoID, issue.Repo.ID) | ||||
| 		for _, label := range issue.Labels { | ||||
|   | ||||
		Reference in New Issue
	
	Block a user