Island: fix detection if credential is a keypair

This commit is contained in:
vakarisz 2022-02-21 10:58:58 +02:00
parent d874cd9d5a
commit bb760c7e8a
1 changed files with 5 additions and 4 deletions

View File

@ -36,8 +36,9 @@ def parse_credentials(credentials: dict):
def is_ssh_keypair(credential: dict) -> bool:
return bool(
filter(
lambda secret: secret["credential_type"] == CredentialsType.SSH_KEYPAIR,
credential["secrets"],
)
[
secret
for secret in credential["secrets"]
if secret["credential_type"] == CredentialsType.SSH_KEYPAIR
]
)