From: Brad Albright <32200834+bhalbright@users.noreply.github.com> Date: Tue, 24 Dec 2019 23:46:16 +0000 (-0600) Subject: adding calls to issue.LoadRepo() prior to calling issue.HTMLURL() (#9484) X-Git-Tag: v1.11.0-rc1~84 X-Git-Url: https://source.dussan.org/?a=commitdiff_plain;h=8e655728e900df10a1d1eedb631dcd8fcb2729d3;p=gitea.git adding calls to issue.LoadRepo() prior to calling issue.HTMLURL() (#9484) --- diff --git a/routers/repo/issue_dependency.go b/routers/repo/issue_dependency.go index 00d7d85ce9..d865a56518 100644 --- a/routers/repo/issue_dependency.go +++ b/routers/repo/issue_dependency.go @@ -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) @@ -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)