Skip to content

Commit

Permalink
Merge branch 'main' into update-github.com/google/go-github
Browse files Browse the repository at this point in the history
  • Loading branch information
lunny authored Apr 8, 2023
2 parents a8ffd88 + b918a2c commit 1234f73
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions routers/web/repo/issue.go
Original file line number Diff line number Diff line change
Expand Up @@ -1154,8 +1154,8 @@ func NewIssuePost(ctx *context.Context) {
}

log.Trace("Issue created: %d/%d", repo.ID, issue.ID)
if ctx.FormString("redirect_after_creation") == "project" {
ctx.Redirect(ctx.Repo.RepoLink + "/projects/" + strconv.FormatInt(form.ProjectID, 10))
if ctx.FormString("redirect_after_creation") == "project" && projectID > 0 {
ctx.Redirect(ctx.Repo.RepoLink + "/projects/" + strconv.FormatInt(projectID, 10))
} else {
ctx.Redirect(issue.Link())
}
Expand Down

0 comments on commit 1234f73

Please sign in to comment.