fallback to default avatar if email is not set

auth submodules are registered with initialized
check if auth.local is loaded before accessing registration route
check DB_URI before attempt to create db
This commit is contained in:
Matthew Scragg 2015-11-06 17:44:48 -06:00
parent e635be8961
commit 0b1c55f6a5
9 changed files with 24 additions and 11 deletions

View file

@ -119,7 +119,8 @@ def filename_to_cname(filename):
def gravatar_url(email):
return "https://www.gravatar.com/avatar/" + hashlib.md5(email).hexdigest()
email = hashlib.md5(email).hexdigest() if email else "default@realms.io"
return "https://www.gravatar.com/avatar/" + email
def in_virtualenv():