-
-
Notifications
You must be signed in to change notification settings - Fork 5.8k
Fix bug to go to 404 when creating pull request #29059
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Changes from all commits
bd30dfa
d78146c
17225a6
7d86652
c5c48bc
057034f
806b394
ca72153
31b4dcf
9d120ba
06c838f
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -1500,8 +1500,8 @@ func CompareAndPullRequestPost(ctx *context.Context) { | |
ctx.ServerError("CompareAndPullRequest.HTMLString", err) | ||
return | ||
} | ||
ctx.Flash.Error(flashError) | ||
ctx.JSONRedirect(pullIssue.Link()) // FIXME: it's unfriendly, and will make the content lost | ||
ctx.Flash.Warning(flashError) | ||
ctx.JSONRedirect(ctx.Link) | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more.
(Oh I see, fix the 404 .... use a ctx.Link now) There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. But why not keep the "Error" and keep the comment? There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. The UI very special, when using Error, the error prompt section will displayed on the left of the input box. There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. So when developing Gitea, when there is a unclear problem, should it always be hacky patched, but not really resolve it clearly? At least, from the framework's view, Flash.Error and Flash.Warning should behave similarly? |
||
return | ||
} | ||
ctx.ServerError("NewPullRequest", err) | ||
|
Uh oh!
There was an error while loading. Please reload this page.