summaryrefslogtreecommitdiffstats
path: root/routers/api/v1/user/repo.go
diff options
context:
space:
mode:
Diffstat (limited to 'routers/api/v1/user/repo.go')
-rw-r--r--routers/api/v1/user/repo.go3
1 files changed, 2 insertions, 1 deletions
diff --git a/routers/api/v1/user/repo.go b/routers/api/v1/user/repo.go
index 760032460e..3d5c841856 100644
--- a/routers/api/v1/user/repo.go
+++ b/routers/api/v1/user/repo.go
@@ -8,6 +8,7 @@ import (
"net/http"
"code.gitea.io/gitea/models"
+ "code.gitea.io/gitea/models/db"
"code.gitea.io/gitea/models/perm"
user_model "code.gitea.io/gitea/models/user"
"code.gitea.io/gitea/modules/context"
@@ -118,7 +119,7 @@ func ListMyRepos(ctx *context.APIContext) {
results := make([]*api.Repository, len(repos))
for i, repo := range repos {
- if err = repo.GetOwner(); err != nil {
+ if err = repo.GetOwner(db.DefaultContext); err != nil {
ctx.Error(http.StatusInternalServerError, "GetOwner", err)
return
}