diff options
author | Giteabot <teabot@gitea.io> | 2024-03-03 04:01:19 +0800 |
---|---|---|
committer | GitHub <noreply@github.com> | 2024-03-02 20:01:19 +0000 |
commit | 971eab18fa0b29312105df739fba443cf9e84d50 (patch) | |
tree | f58b69eb68adaac54f8d958989125c7da54ff2cd /routers/web/repo | |
parent | 86cd94cba6d63c84528f6f8d52b1ec22b44ac2f8 (diff) | |
download | gitea-971eab18fa0b29312105df739fba443cf9e84d50.tar.gz gitea-971eab18fa0b29312105df739fba443cf9e84d50.zip |
Fix incorrect redirection when creating a PR fails (#29537) (#29543)
Backport #29537 by wxiaoguang
This is only a quick fix to make it easier to backport.
Co-authored-by: wxiaoguang <wxiaoguang@gmail.com>
Diffstat (limited to 'routers/web/repo')
-rw-r--r-- | routers/web/repo/pull.go | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/routers/web/repo/pull.go b/routers/web/repo/pull.go index 70bbfeaca9..ec28e60fc9 100644 --- a/routers/web/repo/pull.go +++ b/routers/web/repo/pull.go @@ -1469,7 +1469,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) |