loading up the forgejo repo on tangled to test page performance
0
fork

Configure Feed

Select the types of activity you want to include in your feed.

Fix the nil pointer when assigning issues to projects (#25665)

Fixes #25649
Caused by #25468

authored by

Zettat123 and committed by
GitHub
ff140d40 0006169f

+10 -6
+5 -3
routers/web/org/projects.go
··· 436 436 437 437 projectID := ctx.FormInt64("id") 438 438 for _, issue := range issues { 439 - oldProjectID := issue.Project.ID 440 - if oldProjectID == projectID { 441 - continue 439 + if issue.Project != nil { 440 + oldProjectID := issue.Project.ID 441 + if oldProjectID == projectID { 442 + continue 443 + } 442 444 } 443 445 444 446 if err := issues_model.ChangeProjectAssign(issue, ctx.Doer, projectID); err != nil {
+5 -3
routers/web/repo/projects.go
··· 385 385 386 386 projectID := ctx.FormInt64("id") 387 387 for _, issue := range issues { 388 - oldProjectID := issue.Project.ID 389 - if oldProjectID == projectID { 390 - continue 388 + if issue.Project != nil { 389 + oldProjectID := issue.Project.ID 390 + if oldProjectID == projectID { 391 + continue 392 + } 391 393 } 392 394 393 395 if err := issues_model.ChangeProjectAssign(issue, ctx.Doer, projectID); err != nil {