]> source.dussan.org Git - gitea.git/commitdiff
adding calls to issue.LoadRepo() prior to calling issue.HTMLURL() (#9484)
authorBrad Albright <32200834+bhalbright@users.noreply.github.com>
Tue, 24 Dec 2019 23:46:16 +0000 (17:46 -0600)
committerLauris BH <lauris@nix.lv>
Tue, 24 Dec 2019 23:46:16 +0000 (01:46 +0200)
routers/repo/issue_dependency.go

index 00d7d85ce9cf4a49ea052f19ccc7561fd525a848..d865a56518b7248f0bac8df13a0724fefb783f23 100644 (file)
@@ -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)