Performance improvements for pull request list API (#30490)

Fix #30483

---------

Co-authored-by: yp05327 <576951401@qq.com>
Co-authored-by: Giteabot <teabot@gitea.io>
(cherry picked from commit 352a2cae247afa254241f113c5c22b9351f116b9)
This commit is contained in:
Lunny Xiao 2024-05-31 20:10:11 +08:00 committed by Earl Warren
parent 3e5f85ccf3
commit 47a2102694
No known key found for this signature in database
GPG key ID: 0579CB2928A78A00
12 changed files with 243 additions and 130 deletions

View file

@ -39,7 +39,8 @@ func TestDeleteNotPassedAssignee(t *testing.T) {
assert.NoError(t, err)
assert.Empty(t, issue.Assignees)
// Check they're gone
// Reload to check they're gone
issue.ResetAttributesLoaded()
assert.NoError(t, issue.LoadAssignees(db.DefaultContext))
assert.Empty(t, issue.Assignees)
assert.Empty(t, issue.Assignee)