1
0
Fork 0
mirror of https://codeberg.org/forgejo/forgejo.git synced 2025-10-15 19:42:04 +00:00

Make DeleteIssue use correct context (#24885)

Fix #24884 , the `ctx.Repo.GitRepo` might be nil.

(cherry picked from commit d19d5bc5b8)
This commit is contained in:
wxiaoguang 2023-05-24 01:11:19 +08:00 committed by Earl Warren
parent a28fd056e5
commit 936eb64ebf
No known key found for this signature in database
GPG key ID: 0579CB2928A78A00
3 changed files with 8 additions and 7 deletions

View file

@ -880,7 +880,7 @@ func DeleteIssue(ctx *context.APIContext) {
return
}
if err = issue_service.DeleteIssue(ctx.Doer, ctx.Repo.GitRepo, issue); err != nil {
if err = issue_service.DeleteIssue(ctx, ctx.Doer, ctx.Repo.GitRepo, issue); err != nil {
ctx.Error(http.StatusInternalServerError, "DeleteIssueByID", err)
return
}