Skip to content

Commit 8e65572

Browse files
bhalbrightlafriks
authored andcommitted
adding calls to issue.LoadRepo() prior to calling issue.HTMLURL() (#9484)
1 parent 30181d4 commit 8e65572

File tree

1 file changed

+10
-0
lines changed

1 file changed

+10
-0
lines changed

routers/repo/issue_dependency.go

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -29,6 +29,11 @@ func AddDependency(ctx *context.Context) {
2929
return
3030
}
3131

32+
if err = issue.LoadRepo(); err != nil {
33+
ctx.ServerError("LoadRepo", err)
34+
return
35+
}
36+
3237
// Redirect
3338
defer ctx.Redirect(issue.HTMLURL(), http.StatusSeeOther)
3439

@@ -83,6 +88,11 @@ func RemoveDependency(ctx *context.Context) {
8388
return
8489
}
8590

91+
if err = issue.LoadRepo(); err != nil {
92+
ctx.ServerError("LoadRepo", err)
93+
return
94+
}
95+
8696
// Redirect
8797
ctx.Redirect(issue.HTMLURL(), http.StatusSeeOther)
8898

0 commit comments

Comments
 (0)