summaryrefslogtreecommitdiffstats
path: root/modules/context
diff options
context:
space:
mode:
Diffstat (limited to 'modules/context')
-rw-r--r--modules/context/org.go5
1 files changed, 3 insertions, 2 deletions
diff --git a/modules/context/org.go b/modules/context/org.go
index fd67212a10..d7257361fd 100644
--- a/modules/context/org.go
+++ b/modules/context/org.go
@@ -9,6 +9,7 @@ import (
"strings"
"code.gitea.io/gitea/models"
+ user_model "code.gitea.io/gitea/models/user"
)
// Organization contains organization context
@@ -51,10 +52,10 @@ func HandleOrgAssignment(ctx *Context, args ...bool) {
ctx.Org.Organization, err = models.GetUserByName(orgName)
if err != nil {
if models.IsErrUserNotExist(err) {
- redirectUserID, err := models.LookupUserRedirect(orgName)
+ redirectUserID, err := user_model.LookupUserRedirect(orgName)
if err == nil {
RedirectToUser(ctx, orgName, redirectUserID)
- } else if models.IsErrUserRedirectNotExist(err) {
+ } else if user_model.IsErrUserRedirectNotExist(err) {
ctx.NotFound("GetUserByName", err)
} else {
ctx.ServerError("LookupUserRedirect", err)