From 999286a08996676d94936adefb67d8e1324afff5 Mon Sep 17 00:00:00 2001 From: ibuler Date: Wed, 3 Jun 2020 12:32:52 +0800 Subject: [PATCH] =?UTF-8?q?fix:=20=E4=BF=AE=E5=A4=8D=E7=94=A8=E6=88=B7?= =?UTF-8?q?=E5=85=AC=E9=92=A5=E9=94=99=E8=AF=AF=E5=BC=95=E8=B5=B7=E7=9A=84?= =?UTF-8?q?profile=20bug?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- apps/users/models/user.py | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/apps/users/models/user.py b/apps/users/models/user.py index 473f62197..431a9789b 100644 --- a/apps/users/models/user.py +++ b/apps/users/models/user.py @@ -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)