Make DeleteIssue use correct context (#24885)

Fix #24884 , the `ctx.Repo.GitRepo` might be nil.
This commit is contained in:
wxiaoguang 2023-05-24 01:11:19 +08:00 committed by GitHub
commit d19d5bc5b8
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
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
}