summaryrefslogtreecommitdiffstats
path: root/routers/web/repo/release.go
diff options
context:
space:
mode:
Diffstat (limited to 'routers/web/repo/release.go')
-rw-r--r--routers/web/repo/release.go15
1 files changed, 8 insertions, 7 deletions
diff --git a/routers/web/repo/release.go b/routers/web/repo/release.go
index 3f12ee72bc..9bca4e6897 100644
--- a/routers/web/repo/release.go
+++ b/routers/web/repo/release.go
@@ -13,6 +13,7 @@ import (
"code.gitea.io/gitea/models"
"code.gitea.io/gitea/models/db"
"code.gitea.io/gitea/models/unit"
+ user_model "code.gitea.io/gitea/models/user"
"code.gitea.io/gitea/modules/base"
"code.gitea.io/gitea/modules/context"
"code.gitea.io/gitea/modules/log"
@@ -132,7 +133,7 @@ func releasesOrTags(ctx *context.Context, isTagList bool) {
// Temporary cache commits count of used branches to speed up.
countCache := make(map[string]int64)
- cacheUsers := make(map[int64]*models.User)
+ cacheUsers := make(map[int64]*user_model.User)
if ctx.User != nil {
cacheUsers[ctx.User.ID] = ctx.User
}
@@ -140,10 +141,10 @@ func releasesOrTags(ctx *context.Context, isTagList bool) {
for _, r := range releases {
if r.Publisher, ok = cacheUsers[r.PublisherID]; !ok {
- r.Publisher, err = models.GetUserByID(r.PublisherID)
+ r.Publisher, err = user_model.GetUserByID(r.PublisherID)
if err != nil {
- if models.IsErrUserNotExist(err) {
- r.Publisher = models.NewGhostUser()
+ if user_model.IsErrUserNotExist(err) {
+ r.Publisher = user_model.NewGhostUser()
} else {
ctx.ServerError("GetUserByID", err)
return
@@ -207,10 +208,10 @@ func SingleRelease(ctx *context.Context) {
return
}
- release.Publisher, err = models.GetUserByID(release.PublisherID)
+ release.Publisher, err = user_model.GetUserByID(release.PublisherID)
if err != nil {
- if models.IsErrUserNotExist(err) {
- release.Publisher = models.NewGhostUser()
+ if user_model.IsErrUserNotExist(err) {
+ release.Publisher = user_model.NewGhostUser()
} else {
ctx.ServerError("GetUserByID", err)
return