Fix incorrect redirection when creating a PR fails (#29537)
This is only a quick fix to make it easier to backport.
After this PR gets merged, I will propose a new PR to fix the FIXME.
<details>

</details>
This commit is contained in:
parent
c0c2cb933b
commit
e650f64d81
5 changed files with 6 additions and 24 deletions
|
@ -1501,7 +1501,7 @@ func CompareAndPullRequestPost(ctx *context.Context) {
|
|||
return
|
||||
}
|
||||
ctx.Flash.Error(flashError)
|
||||
ctx.JSONRedirect(pullIssue.Link()) // FIXME: it's unfriendly, and will make the content lost
|
||||
ctx.JSONRedirect(ctx.Link + "?" + ctx.Req.URL.RawQuery) // FIXME: it's unfriendly, and will make the content lost
|
||||
return
|
||||
}
|
||||
ctx.ServerError("NewPullRequest", err)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue