Fix logic with gravatar email

This commit is contained in:
amcmanu3 2022-09-09 15:04:45 -04:00
parent 375df0c27d
commit 2b35da71fc
3 changed files with 9 additions and 9 deletions

View File

@ -339,9 +339,9 @@ class PanelHandler(BaseHandler):
# Get grvatar hash for profile pictures
if (
self.helper.check_internet()
and exec_user["email"] != "default@example.com"
and exec_user["email"] == ""
not self.helper.check_internet()
or exec_user["email"] != "default@example.com"
or exec_user["email"] != ""
):
gravatar = libgravatar.Gravatar(
libgravatar.sanitize_email(exec_user["email"])

View File

@ -29,9 +29,9 @@ class ApiUsersUserPfpHandler(BaseApiHandler):
# Get grvatar hash for profile pictures
if (
self.helper.check_internet()
and user["email"] != "default@example.com"
and user["email"] == ""
not self.helper.check_internet()
or user["email"] != "default@example.com"
or user["email"] != ""
):
gravatar = libgravatar.Gravatar(libgravatar.sanitize_email(user["email"]))
url = gravatar.get_image(

View File

@ -139,9 +139,9 @@ class ServerHandler(BaseHandler):
rating = "g"
if (
self.helper.check_internet()
and exec_user["email"] != "default@example.com"
and exec_user["email"] == ""
not self.helper.check_internet()
or exec_user["email"] != "default@example.com"
or exec_user["email"] != ""
):
gravatar = libgravatar.Gravatar(
libgravatar.sanitize_email(exec_user["email"])