fix: 修复用户公钥错误引起的profile bug

pull/4070/head
ibuler 2020-06-03 12:32:52 +08:00
parent 68ccaf0cb3
commit 999286a089
1 changed files with 4 additions and 1 deletions

View File

@ -89,7 +89,10 @@ class AuthMixin:
def get_public_key_hash_md5(self):
if not callable(self.public_key_obj.hash_md5):
return ''
return self.public_key_obj.hash_md5()
try:
return self.public_key_obj.hash_md5()
except:
return ''
def reset_password(self, new_password):
self.set_password(new_password)