From 69d4a0a25008708942b8210724e7870b0dbf801c Mon Sep 17 00:00:00 2001 From: feng626 <1304903146@qq.com> Date: Wed, 19 Jan 2022 10:39:17 +0800 Subject: [PATCH] =?UTF-8?q?fix:=20=E4=BF=AE=E6=94=B9=20=E4=BF=AE=E6=94=B9s?= =?UTF-8?q?sh=E5=AF=86=E9=92=A5=E6=97=B6=E6=8A=A5500=E9=97=AE=E9=A2=98?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- apps/assets/serializers/base.py | 1 + 1 file changed, 1 insertion(+) diff --git a/apps/assets/serializers/base.py b/apps/assets/serializers/base.py index 9eabc41a9..2cc2d49a5 100644 --- a/apps/assets/serializers/base.py +++ b/apps/assets/serializers/base.py @@ -43,6 +43,7 @@ class AuthSerializerMixin(serializers.ModelSerializer): if not private_key: return passphrase = self.initial_data.get('passphrase') + passphrase = passphrase if passphrase else None valid = validate_ssh_private_key(private_key, password=passphrase) if not valid: raise serializers.ValidationError(_("private key invalid or passphrase error"))