Fix another bug for user search

This commit is contained in:
cuom1999 2023-08-24 00:02:02 -05:00
parent c083ba5a3c
commit 47d3811aa5

View file

@ -14,9 +14,10 @@ def gravatar(profile, size=80, default=None, profile_image=None, email=None):
return profile_image
if profile and profile.profile_image:
return profile.profile_image.url
if default is None and profile:
default = profile.mute
if profile:
email = email or profile.user.email
if default is None:
default = profile.mute
gravatar_url = (
"//www.gravatar.com/avatar/"
+ hashlib.md5(utf8bytes(email.strip().lower())).hexdigest()