aboutsummaryrefslogtreecommitdiff
path: root/internal/route/repo/pull.go
diff options
context:
space:
mode:
Diffstat (limited to 'internal/route/repo/pull.go')
-rw-r--r--internal/route/repo/pull.go13
1 files changed, 10 insertions, 3 deletions
diff --git a/internal/route/repo/pull.go b/internal/route/repo/pull.go
index 2745c336..c203266c 100644
--- a/internal/route/repo/pull.go
+++ b/internal/route/repo/pull.go
@@ -69,11 +69,18 @@ func parseBaseRepository(c *context.Context) *db.Repository {
}
c.Data["ForkFrom"] = baseRepo.Owner.Name + "/" + baseRepo.Name
- if err := c.User.GetOrganizations(true); err != nil {
- c.Error(err, "get organizations")
+ orgs, err := db.Orgs.List(
+ c.Req.Context(),
+ db.ListOrgOptions{
+ MemberID: c.User.ID,
+ IncludePrivateMembers: true,
+ },
+ )
+ if err != nil {
+ c.Error(err, "list organizations")
return nil
}
- c.Data["Orgs"] = c.User.Orgs
+ c.Data["Orgs"] = orgs
return baseRepo
}