aboutsummaryrefslogtreecommitdiff
path: root/internal/route/repo/issue.go
diff options
context:
space:
mode:
Diffstat (limited to 'internal/route/repo/issue.go')
-rw-r--r--internal/route/repo/issue.go2
1 files changed, 1 insertions, 1 deletions
diff --git a/internal/route/repo/issue.go b/internal/route/repo/issue.go
index 1fd4820e..7f839045 100644
--- a/internal/route/repo/issue.go
+++ b/internal/route/repo/issue.go
@@ -68,7 +68,7 @@ func MustAllowPulls(c *context.Context) {
}
// User can send pull request if owns a forked repository.
- if c.IsLogged && db.Users.HasForkedRepository(c.Req.Context(), c.User.ID, c.Repo.Repository.ID) {
+ if c.IsLogged && db.Repos.HasForkedBy(c.Req.Context(), c.Repo.Repository.ID, c.User.ID) {
c.Repo.PullRequest.Allowed = true
c.Repo.PullRequest.HeadInfo = c.User.Name + ":" + c.Repo.BranchName
}