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
|
return profile_image
|
||||||
if profile and profile.profile_image:
|
if profile and profile.profile_image:
|
||||||
return profile.profile_image.url
|
return profile.profile_image.url
|
||||||
if default is None and profile:
|
if profile:
|
||||||
default = profile.mute
|
email = email or profile.user.email
|
||||||
email = email or profile.user.email
|
if default is None:
|
||||||
|
default = profile.mute
|
||||||
gravatar_url = (
|
gravatar_url = (
|
||||||
"//www.gravatar.com/avatar/"
|
"//www.gravatar.com/avatar/"
|
||||||
+ hashlib.md5(utf8bytes(email.strip().lower())).hexdigest()
|
+ hashlib.md5(utf8bytes(email.strip().lower())).hexdigest()
|
||||||
|
|
Loading…
Reference in a new issue