Fix another bug for user search
This commit is contained in:
parent
c083ba5a3c
commit
47d3811aa5
1 changed files with 4 additions and 3 deletions
|
@ -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()
|
||||
|
|
Loading…
Reference in a new issue