Improve loadprojects for issue list (#25468)

This commit is contained in:
Lunny Xiao 2023-06-24 23:31:28 +08:00 committed by GitHub
parent 5eeddfde10
commit 083818cb85
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
7 changed files with 41 additions and 30 deletions

View file

@ -378,9 +378,14 @@ func UpdateIssueProject(ctx *context.Context) {
return
}
if err := issues.LoadProjects(ctx); err != nil {
ctx.ServerError("LoadProjects", err)
return
}
projectID := ctx.FormInt64("id")
for _, issue := range issues {
oldProjectID := issue.ProjectID()
oldProjectID := issue.Project.ID
if oldProjectID == projectID {
continue
}