summaryrefslogtreecommitdiffstats
path: root/routers/repo/issue_dependency.go
diff options
context:
space:
mode:
authorBrad Albright <32200834+bhalbright@users.noreply.github.com>2019-12-24 17:46:16 -0600
committerLauris BH <lauris@nix.lv>2019-12-25 01:46:16 +0200
commit8e655728e900df10a1d1eedb631dcd8fcb2729d3 (patch)
tree34269870ef33380adbb4a99c97d684d02c8317cd /routers/repo/issue_dependency.go
parent30181d459da79ef57c58bb3789e2ce7130d08b77 (diff)
downloadgitea-8e655728e900df10a1d1eedb631dcd8fcb2729d3.tar.gz
gitea-8e655728e900df10a1d1eedb631dcd8fcb2729d3.zip
adding calls to issue.LoadRepo() prior to calling issue.HTMLURL() (#9484)
Diffstat (limited to 'routers/repo/issue_dependency.go')
-rw-r--r--routers/repo/issue_dependency.go10
1 files changed, 10 insertions, 0 deletions
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)