Skip to content

Commit

Permalink
adding calls to issue.LoadRepo() prior to calling issue.HTMLURL() (#9484
Browse files Browse the repository at this point in the history
)
  • Loading branch information
bhalbright authored and lafriks committed Dec 24, 2019
1 parent 30181d4 commit 8e65572
Showing 1 changed file with 10 additions and 0 deletions.
10 changes: 10 additions & 0 deletions routers/repo/issue_dependency.go
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,11 @@ func AddDependency(ctx *context.Context) {
return
}

if err = issue.LoadRepo(); err != nil {
ctx.ServerError("LoadRepo", err)
return
}

// Redirect
defer ctx.Redirect(issue.HTMLURL(), http.StatusSeeOther)

Expand Down Expand Up @@ -83,6 +88,11 @@ func RemoveDependency(ctx *context.Context) {
return
}

if err = issue.LoadRepo(); err != nil {
ctx.ServerError("LoadRepo", err)
return
}

// Redirect
ctx.Redirect(issue.HTMLURL(), http.StatusSeeOther)

Expand Down

0 comments on commit 8e65572

Please sign in to comment.