summaryrefslogtreecommitdiffstats
path: root/routers/user
diff options
context:
space:
mode:
Diffstat (limited to 'routers/user')
-rw-r--r--routers/user/setting.go2
1 files changed, 1 insertions, 1 deletions
diff --git a/routers/user/setting.go b/routers/user/setting.go
index 9be567a487..53b7fdf929 100644
--- a/routers/user/setting.go
+++ b/routers/user/setting.go
@@ -286,7 +286,7 @@ func SettingsSSHKeysPost(ctx *middleware.Context, form auth.AddSSHKeyForm) {
content, err := models.CheckPublicKeyString(form.Content)
if err != nil {
- if err == models.ErrKeyUnableVerify {
+ if models.IsErrKeyUnableVerify(err) {
ctx.Flash.Info(ctx.Tr("form.unable_verify_ssh_key"))
} else {
ctx.Flash.Error(ctx.Tr("form.invalid_ssh_key", err.Error()))