From 515eec3d1a02603c07e2bc39bb351792d4ac95e8 Mon Sep 17 00:00:00 2001 From: Maxim Slipenko Date: Sat, 21 Dec 2024 21:25:38 +0000 Subject: [PATCH] remove `len(sshKeys) == 0` check --- routers/web/auth/oauth.go | 4 ---- 1 file changed, 4 deletions(-) diff --git a/routers/web/auth/oauth.go b/routers/web/auth/oauth.go index 48aaca17cb..4d8fbcb7a5 100644 --- a/routers/web/auth/oauth.go +++ b/routers/web/auth/oauth.go @@ -1222,10 +1222,6 @@ func updateSSHPubIfNeed( return err } - if len(sshKeys) == 0 { - return nil - } - if asymkey_model.SynchronizePublicKeys(ctx, user, authSource, sshKeys) { err = asymkey_model.RewriteAllPublicKeys(ctx) if err != nil {