From 50c997b568ecf658a47fc2900ab88d6d6e312d08 Mon Sep 17 00:00:00 2001 From: David Taylor Date: Wed, 21 Jun 2017 11:28:07 +0100 Subject: [PATCH] Fixed profile picture encoding --- RIGS/models.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/RIGS/models.py b/RIGS/models.py index 025ea508..6fcc200f 100644 --- a/RIGS/models.py +++ b/RIGS/models.py @@ -38,7 +38,7 @@ class Profile(AbstractUser): def profile_picture(self): url = "" if settings.USE_GRAVATAR or settings.USE_GRAVATAR is None: - url = "https://www.gravatar.com/avatar/" + hashlib.md5(self.email).hexdigest() + "?d=wavatar&s=500" + url = "https://www.gravatar.com/avatar/" + hashlib.md5(self.email.encode('utf-8')).hexdigest() + "?d=wavatar&s=500" return url @property