Skip to content

Commit 2212546

Browse files
committed
fix: return false on error
1 parent 59bb08b commit 2212546

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

services/asymkey/sign.go

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -75,7 +75,7 @@ func userHasPubkeys(ctx context.Context, u *user_model.User) (bool, error) {
7575
IncludeSubKeys: true,
7676
})
7777
if err != nil {
78-
return nil, err
78+
return false, err
7979
}
8080
if len(gpgKeys) > 0 {
8181
return true, nil
@@ -86,7 +86,7 @@ func userHasPubkeys(ctx context.Context, u *user_model.User) (bool, error) {
8686
NotKeytype: asymkey_model.KeyTypePrincipal,
8787
})
8888
if err != nil {
89-
return nil, err
89+
return false, err
9090
}
9191
if len(sshKeys) > 0 {
9292
return true, nil

0 commit comments

Comments
 (0)