From d2ae6642ebc83f5cfa436892f916790909c80f68 Mon Sep 17 00:00:00 2001 From: Bai Date: Fri, 3 Feb 2023 14:28:32 +0800 Subject: [PATCH] =?UTF-8?q?fix:=20=E4=BF=AE=E5=A4=8D=E6=9B=B4=E6=96=B0?= =?UTF-8?q?=E8=B4=A6=E5=8F=B7=E6=97=B6secret=E4=B8=8D=E6=AD=A3=E7=A1=AE?= =?UTF-8?q?=E5=AF=BC=E8=87=B4=E6=9B=B4=E6=96=B0=E5=A4=B1=E8=B4=A5=E7=9A=84?= =?UTF-8?q?=E9=97=AE=E9=A2=98?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- apps/accounts/models/base.py | 3 +++ 1 file changed, 3 insertions(+) diff --git a/apps/accounts/models/base.py b/apps/accounts/models/base.py index 37b97f21a..cd1fef5e8 100644 --- a/apps/accounts/models/base.py +++ b/apps/accounts/models/base.py @@ -92,6 +92,9 @@ class BaseAccount(JMSOrgBaseModel): else: return '' + if not public_key: + return '' + public_key_obj = sshpubkeys.SSHKey(public_key) fingerprint = public_key_obj.hash_md5() return fingerprint