mirror of
https://codeberg.org/forgejo/forgejo.git
synced 2024-12-28 22:53:54 +03:00
Fix redirect bug when creating issue from a project (#23971)
Fix #23966
This commit is contained in:
parent
8f00979f73
commit
b918a2c4fb
1 changed files with 2 additions and 2 deletions
|
@ -1154,8 +1154,8 @@ func NewIssuePost(ctx *context.Context) {
|
||||||
}
|
}
|
||||||
|
|
||||||
log.Trace("Issue created: %d/%d", repo.ID, issue.ID)
|
log.Trace("Issue created: %d/%d", repo.ID, issue.ID)
|
||||||
if ctx.FormString("redirect_after_creation") == "project" {
|
if ctx.FormString("redirect_after_creation") == "project" && projectID > 0 {
|
||||||
ctx.Redirect(ctx.Repo.RepoLink + "/projects/" + strconv.FormatInt(form.ProjectID, 10))
|
ctx.Redirect(ctx.Repo.RepoLink + "/projects/" + strconv.FormatInt(projectID, 10))
|
||||||
} else {
|
} else {
|
||||||
ctx.Redirect(issue.Link())
|
ctx.Redirect(issue.Link())
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue