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>

![image](98d1d5c4-2e79-4a75-80e9-76fd898986e0)

</details>

(cherry picked from commit e650f64d812f5ebeb4a11d2ec20f2376c6d963bc)
This commit is contained in:
wxiaoguang 2024-03-02 20:45:14 +08:00 committed by Earl Warren
parent 5241a45cf8
commit db19d4eb39
No known key found for this signature in database
GPG key ID: 0579CB2928A78A00
5 changed files with 6 additions and 24 deletions

View file

@ -1535,7 +1535,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)