summaryrefslogtreecommitdiffstats
path: root/routers/install.go
diff options
context:
space:
mode:
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