summaryrefslogtreecommitdiffstats
path: root/routers/install.go
diff options
context:
space:
mode:
authorUnknwon <u@gogs.io>2015-03-26 17:11:47 -0400
committerUnknwon <u@gogs.io>2015-03-26 17:11:47 -0400
commit698b9e2acc4daafe7d2b314e2d8c96545dde9c40 (patch)
tree8d593bb0816503494de4deb16ee0fa6b95eb3c5c /routers/install.go
parentd76f11c6f14b69bf981e5fc3901cc2c6445773b8 (diff)
downloadgitea-698b9e2acc4daafe7d2b314e2d8c96545dde9c40.tar.gz
gitea-698b9e2acc4daafe7d2b314e2d8c96545dde9c40.zip
#1070 Clearer error message for illegal characters
Diffstat (limited to 'routers/install.go')
-rw-r--r--routers/install.go2
1 files changed, 1 insertions, 1 deletions
diff --git a/routers/install.go b/routers/install.go
index f5dc0c580b..6da611286f 100644
--- a/routers/install.go
+++ b/routers/install.go
@@ -239,7 +239,7 @@ func InstallPost(ctx *middleware.Context, form auth.InstallForm) {
// Create admin account.
if err := models.CreateUser(&models.User{Name: form.AdminName, Email: form.AdminEmail, Passwd: form.AdminPasswd,
IsAdmin: true, IsActive: true}); err != nil {
- if err != models.ErrUserAlreadyExist {
+ if !models.IsErrUserAlreadyExist(err) {
setting.InstallLock = false
ctx.Data["Err_AdminName"] = true
ctx.Data["Err_AdminEmail"] = true