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